Автор: Henrique Moody (henriquemoody@gmail.com)
Наследование: extends Respect\Validation\Rules\AbstractRule
Пример #1
0
 /**
  * @expectedException Respect\Validation\Exceptions\SizeException
  * @expectedExceptionMessage "vfs://root/1gb.txt" must be greater than 2pb
  */
 public function testShouldThrowsSizeExceptionWhenAsserting()
 {
     $root = vfsStream::setup();
     $file1Gb = vfsStream::newFile('1gb.txt')->withContent(LargeFileContent::withGigabytes(1))->at($root);
     $rule = new Size('2pb');
     $rule->assert($file1Gb->url());
 }