Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Napoli <matthieu@mnapoli.fr>2014-11-14 03:46:47 +0300
committerMatthieu Napoli <matthieu@mnapoli.fr>2014-11-14 03:46:47 +0300
commit8ed874f347673e75a604efff2edc5b6c9d0debcd (patch)
tree16ad98601fc70e49dddc0ce7764069d3ad34d3a3 /tests/PHPUnit/Core
parentabdf9c8001d626fca70e2d4b4c8a6c31e9f20b66 (diff)
Moved integration tests to namespaces
Diffstat (limited to 'tests/PHPUnit/Core')
-rw-r--r--tests/PHPUnit/Core/API/DocumentationGeneratorTest.php69
1 files changed, 0 insertions, 69 deletions
diff --git a/tests/PHPUnit/Core/API/DocumentationGeneratorTest.php b/tests/PHPUnit/Core/API/DocumentationGeneratorTest.php
deleted file mode 100644
index 5fb119f6a0..0000000000
--- a/tests/PHPUnit/Core/API/DocumentationGeneratorTest.php
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-/**
- * Copyright (C) Piwik PRO - All rights reserved.
- *
- * Using this code requires that you first get a license from Piwik PRO.
- * Unauthorized copying of this file, via any medium is strictly prohibited.
- *
- * @link http://piwik.pro
- */
-use Piwik\API\DocumentationGenerator;
-use Piwik\API\Proxy;
-use Piwik\EventDispatcher;
-use Piwik\Plugin\Manager as PluginManager;
-
-/**
- * @group Core
- */
-class DocumentationGeneratorTest extends PHPUnit_Framework_TestCase
-{
- public function test_CheckIfModule_ContainsHideAnnotation()
- {
- $annotation = '@hideExceptForSuperUser test test';
- $mock = $this->getMockBuilder('ReflectionClass')
- ->disableOriginalConstructor()
- ->setMethods(array('getDocComment'))
- ->getMock();
- $mock->expects($this->once())->method('getDocComment')->willReturn($annotation);
- $documentationGenerator = new DocumentationGenerator();
- $this->assertTrue($documentationGenerator->checkIfClassCommentContainsHideAnnotation($mock));
- }
-
- public function test_CheckDocumentation()
- {
- $moduleToCheck = 'this is documentation which contains @hideExceptForSuperUser';
- $documentationAfterCheck = 'this is documentation which contains ';
- $documentationGenerator = new DocumentationGenerator();
- $this->assertEquals($documentationGenerator->checkDocumentation($moduleToCheck), $documentationAfterCheck);
- }
-
- public function test_CheckIfMethodComment_ContainsHideAnnotation_andText()
- {
- $annotation = '@hideForAll test test';
- EventDispatcher::getInstance()->addObserver('API.DocumentationGenerator.@hideForAll',
- function (&$hide) {
- $hide = true;
- });
- $this->assertEquals(Proxy::getInstance()->shouldHideAPIMethod($annotation), true);
- }
-
- public function test_CheckIfMethodComment_ContainsHideAnnotation_only()
- {
- $annotation = '@hideForAll';
- EventDispatcher::getInstance()->addObserver('API.DocumentationGenerator.@hideForAll',
- function (&$hide) {
- $hide = true;
- });
- $this->assertEquals(Proxy::getInstance()->shouldHideAPIMethod($annotation), true);
- }
-
- public function test_CheckIfMethodComment_DoesNotContainHideAnnotation()
- {
- $annotation = '@not found here';
- EventDispatcher::getInstance()->addObserver('API.DocumentationGenerator.@hello',
- function (&$hide) {
- $hide = true;
- });
- $this->assertEquals(Proxy::getInstance()->shouldHideAPIMethod($annotation), false);
- }
-} \ No newline at end of file