X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=tests%2Funit%2Fmodels%2FTypesTest.php;h=2d78c4aed9408ab1d2f2af63e7a04dd0a2975c46;hb=cc1d4a4454905acc36282cd173f3312e122ff19b;hp=86ea793c84a5df51a82855ed1725741962352245;hpb=1f27e48df6c77321106dea8dee25607290e37a4b;p=invent%2Finvent.git diff --git a/tests/unit/models/TypesTest.php b/tests/unit/models/TypesTest.php index 86ea793..2d78c4a 100644 --- a/tests/unit/models/TypesTest.php +++ b/tests/unit/models/TypesTest.php @@ -14,7 +14,7 @@ class TypesTest extends \Codeception\Test\Unit protected function _before() { - + $this->types = new Types(); } protected function _after() @@ -23,27 +23,21 @@ class TypesTest extends \Codeception\Test\Unit public function testEnterNull() { - $this->types = new Types(); - // Пустое значение недопустимо $this->types->name = NULL; $this->assertFalse($this->types->validate([ 'name' ])); } - - public function testEnterLong() + + public function testEnterAbove100() { - $this->types = new Types(); - // Больше 100 символов недопустимо - $this->types->name = '**** aaaaabbbbbcccccdddddeeeeefffffggggghhhhhiiiiijjjjjkkkkklllllmmmmmnnnnnooooopppppqqqqqrrrrrsssss ****'; + $this->types->name = '**** ' . str_repeat('a', 100) . ' ****'; $this->assertFalse($this->types->validate([ 'name' ])); } // tests public function testEnterData() { - $this->types = new Types(); - $validName = '--TEST TYPE--'; // Допустимая комбинация $this->types->name = $validName;