Exemplo n.º 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());
 }
 /**
  * set up test environment
  */
 public function setUp()
 {
     $root = vfsStream::setup();
     $this->largeFile = vfsStream::newFile('large.txt')->withContent(LargeFileContent::withGigabytes(100))->at($root);
 }