Browse Source

Unify PHPUnit test name style

Kuba Werłos 5 years ago
parent
commit
a01e962c5d

+ 1 - 0
.php_cs

@@ -13,4 +13,5 @@ return PhpCsFixer\Config::create()
     ->setRiskyAllowed(true)
     ->setRules([
         '@PSR2' => true,
+        'php_unit_test_annotation' => true,
     ]);

+ 4 - 4
tests/Bridge/Laravel/SlugifyProviderTest.php

@@ -42,10 +42,10 @@ class SlugifyProviderTest extends MockeryTestCase
     }
 
     /**
-     * @test
+     *
      * @covers Cocur\Slugify\Bridge\Laravel\SlugifyServiceProvider::register()
      */
-    public function registerRegistersTheServiceProvider()
+    public function testRegisterRegistersTheServiceProvider()
     {
         $this->provider->register();
 
@@ -57,10 +57,10 @@ class SlugifyProviderTest extends MockeryTestCase
     }
 
     /**
-     * @test
+     *
      * @covers Cocur\Slugify\Bridge\Laravel\SlugifyServiceProvider::provides()
      */
-    public function containsReturnsTheNameOfThProvider()
+    public function testContainsReturnsTheNameOfThProvider()
     {
         $this->assertContains('slugify', $this->provider->provides());
     }

+ 2 - 2
tests/Bridge/Latte/SlugifyHelperTest.php

@@ -25,10 +25,10 @@ class SlugifyHelperTest extends MockeryTestCase
     }
 
     /**
-     * @test
+     *
      * @covers Cocur\Slugify\Bridge\Latte\SlugifyHelper::slugify()
      */
-    public function slugify()
+    public function testSlugify()
     {
         $this->slugify->shouldReceive('slugify')->with('hällo wörld', '_')->once()->andReturn('haello_woerld');
 

+ 4 - 4
tests/Bridge/Nette/SlugifyExtensionTest.php

@@ -24,10 +24,10 @@ class SlugifyExtensionTest extends MockeryTestCase
     }
 
     /**
-     * @test
+     *
      * @covers Cocur\Slugify\Bridge\Nette\SlugifyExtension::loadConfiguration()
      */
-    public function loadConfiguration()
+    public function testLoadConfiguration()
     {
         $slugify = m::mock('Nette\DI\ServiceDefinition');
         $slugify
@@ -76,10 +76,10 @@ class SlugifyExtensionTest extends MockeryTestCase
     }
 
     /**
-     * @test
+     *
      * @covers Cocur\Slugify\Bridge\Nette\SlugifyExtension::beforeCompile()
      */
-    public function beforeCompile()
+    public function testBeforeCompile()
     {
         $latteFactory = m::mock('Nette\DI\ServiceDefinition');
         $latteFactory

+ 4 - 4
tests/Bridge/Plum/SlugifyConverterTest.php

@@ -26,11 +26,11 @@ use Mockery\Adapter\Phpunit\MockeryTestCase;
 class SlugifyConverterTest extends MockeryTestCase
 {
     /**
-     * @test
+     *
      * @covers Cocur\Slugify\Bridge\Plum\SlugifyConverter::__construct()
      * @covers Cocur\Slugify\Bridge\Plum\SlugifyConverter::convert()
      */
-    public function convertSlugifiesString()
+    public function testConvertSlugifiesString()
     {
         $slugify = Mockery::mock('Cocur\Slugify\SlugifyInterface');
         $slugify->shouldReceive('slugify')->with('Hello World')->once()->andReturn('hello_world');
@@ -40,11 +40,11 @@ class SlugifyConverterTest extends MockeryTestCase
     }
 
     /**
-     * @test
+     *
      * @covers Cocur\Slugify\Bridge\Plum\SlugifyConverter::__construct()
      * @covers Cocur\Slugify\Bridge\Plum\SlugifyConverter::convert()
      */
-    public function constructorCreatesSlugifyIfNoneIsProvided()
+    public function testConstructorCreatesSlugifyIfNoneIsProvided()
     {
         $converter = new SlugifyConverter();
 

+ 4 - 4
tests/Bridge/Silex/SlugifySilexProviderTest.php

@@ -31,10 +31,10 @@ use Mockery\Adapter\Phpunit\MockeryTestCase;
 class SlugifySilexProviderTest extends MockeryTestCase
 {
     /**
-     * @test
+     *
      * @covers Cocur\Slugify\Bridge\Silex\SlugifyServiceProvider
      */
-    public function register()
+    public function testRegister()
     {
         // it seems like Application is not mockable.
         $app = new Application();
@@ -48,9 +48,9 @@ class SlugifySilexProviderTest extends MockeryTestCase
     }
 
     /**
-     * @test
+     *
      */
-    public function registerWithTwig()
+    public function testRegisterWithTwig()
     {
         $app = new Application();
         $app->register(new TwigServiceProvider());

+ 2 - 2
tests/Bridge/Symfony/CocurSlugifyExtensionTest.php

@@ -34,10 +34,10 @@ class CocurSlugifyExtensionTest extends MockeryTestCase
     }
 
     /**
-     * @test
+     *
      * @covers Cocur\Slugify\Bridge\Symfony\CocurSlugifyExtension::load()
      */
-    public function load()
+    public function testLoad()
     {
         $twigDefinition = m::mock('Symfony\Component\DependencyInjection\Definition');
         $twigDefinition

+ 4 - 4
tests/Bridge/Twig/SlugifyExtensionTest.php

@@ -45,10 +45,10 @@ class SlugifyExtensionTest extends MockeryTestCase
     }
 
     /**
-     * @test
+     *
      * @covers Cocur\Slugify\Bridge\Twig\SlugifyExtension::getFilters()
      */
-    public function getFilters()
+    public function testGetFilters()
     {
         $filters = $this->extension->getFilters();
 
@@ -57,10 +57,10 @@ class SlugifyExtensionTest extends MockeryTestCase
     }
 
     /**
-     * @test
+     *
      * @covers Cocur\Slugify\Bridge\Twig\SlugifyExtension::slugifyFilter()
      */
-    public function slugifyFilter()
+    public function testSlugifyFilter()
     {
         $this->slugify->shouldReceive('slugify')->with('hällo wörld', '_')->once()->andReturn('haello_woerld');
 

+ 4 - 4
tests/Bridge/ZF2/ModuleTest.php

@@ -23,10 +23,10 @@ class ModuleTest extends MockeryTestCase
     }
 
     /**
-     * @test
+     *
      * @covers Cocur\Slugify\Bridge\ZF2\Module::getServiceConfig()
      */
-    public function getServiceConfig()
+    public function testGetServiceConfig()
     {
         $smConfig = $this->module->getServiceConfig();
         $this->assertTrue(is_array($smConfig));
@@ -37,10 +37,10 @@ class ModuleTest extends MockeryTestCase
     }
 
     /**
-     * @test
+     *
      * @covers Cocur\Slugify\Bridge\ZF2\Module::getViewHelperConfig()
      */
-    public function getViewHelperConfig()
+    public function testGetViewHelperConfig()
     {
         $vhConfig = $this->module->getViewHelperConfig();
         $this->assertTrue(is_array($vhConfig));

+ 4 - 4
tests/Bridge/ZF2/SlugifyServiceTest.php

@@ -25,10 +25,10 @@ class SlugifyServiceTest extends MockeryTestCase
     }
 
     /**
-     * @test
+     *
      * @covers Cocur\Slugify\Bridge\ZF2\SlugifyService::__invoke()
      */
-    public function invokeWithoutCustomConfig()
+    public function testInvokeWithoutCustomConfig()
     {
         $sm = $this->createServiceManagerMock();
         $slugify = call_user_func($this->slugifyService, $sm);
@@ -41,10 +41,10 @@ class SlugifyServiceTest extends MockeryTestCase
     }
 
     /**
-     * @test
+     *
      * @covers Cocur\Slugify\Bridge\ZF2\SlugifyService::__invoke()
      */
-    public function invokeWithCustomConfig()
+    public function testInvokeWithCustomConfig()
     {
         $sm = $this->createServiceManagerMock([
             Module::CONFIG_KEY => [

Some files were not shown because too many files changed in this diff