function testValidateDir() { $return = Min::validateDir('tests'); $this->assertTrue($return); $return = Min::validateDir('tests'); $this->assertTrue($return); chmod('tests', 00); $this->expectException(); Min::validateDir('tests'); rmdir('tests'); }
/** * @test * * So this test is skipped, because compensate doesn't work. Need to * think up a way of doing this without effective keeping the whole * window in memory. */ public function compensateRemovesNumber() { $this->markTestIncomplete(); return; $min = new Min(); $min->init(); $min->accumulate(1); $min->accumulate(5); $min->compensate(1); $this->assertEquals(5, $min->emit()); }
/** * @dataProvider providerForInvalidMin * @expectedException Respect\Validation\Exceptions\MinException */ public function testInvalidMinShouldThrowMinException($minValue, $inclusive, $input) { $min = new Min($minValue, $inclusive); $this->assertFalse($min->__invoke($input)); $this->assertFalse($min->assert($input)); }
/** * @dataProvider providerForInvalidMin * @expectedException Respect\Validation\Exceptions\MinException */ public function test_invalid_min_should_throw_MinException($minValue, $inclusive, $input) { $min = new Min($minValue, $inclusive); $this->assertFalse($min->validate($input)); $this->assertFalse($min->assert($input)); }