1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
<?php
declare(strict_types=1);
namespace Doctrine\Tests\Inflector\Rules;
use Doctrine\Inflector\Rules\Pattern;
use Doctrine\Inflector\Rules\Transformation;
use Doctrine\Inflector\Rules\Transformations;
use PHPUnit\Framework\TestCase;
class TransformationsTest extends TestCase
{
/** @var Transformations */
private $transformations;
public function testInflect(): void
{
self::assertSame('customizables', $this->transformations->inflect('custom'));
}
protected function setUp(): void
{
$this->transformations = new Transformations(new Transformation(new Pattern('/^(custom)$/i'), '\1izables'));
}
}
|