Skip to content

Commit

Permalink
Merge pull request #932 from loic425/phpunit-2-phpspec/humanizer
Browse files Browse the repository at this point in the history
[phpspec-2-phpunit] migration of tests (Humanizer)
  • Loading branch information
GSadee authored Sep 23, 2024
2 parents 7125cd7 + 5b1ddf9 commit baeec27
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 32 deletions.
32 changes: 0 additions & 32 deletions src/Component/spec/Humanizer/StringHumanizerSpec.php

This file was deleted.

35 changes: 35 additions & 0 deletions src/Component/tests/Humanizer/StringHumanizerTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

/*
* This file is part of the Sylius package.
*
* (c) Sylius Sp. z o.o.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace Sylius\Resource\Tests\Humanizer;

use PHPUnit\Framework\TestCase;
use Sylius\Resource\Humanizer\StringHumanizer;

final class StringHumanizerTest extends TestCase
{
public function testItIsInitializable(): void
{
$humanizer = new StringHumanizer();
$this->assertInstanceOf(StringHumanizer::class, $humanizer);
}

public function testItHumanizesAString(): void
{
$humanizer = new StringHumanizer();

$this->assertSame('admin user', $humanizer::humanize('admin_user'));
$this->assertSame('admin user', $humanizer::humanize('Admin_user'));
$this->assertSame('admin user', $humanizer::humanize('AdminUser'));
}
}

0 comments on commit baeec27

Please sign in to comment.