/** * @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()); }