results[$f] = $result; } protected function assertKeyedequals($expectedValue, $array, $key) { $this->assertTrue( array_key_exists($key, $array), "Expected key '$key' to be present in array" ); $this->assertEquals($expectedValue, $array[$key]); } public function testSparsenessConfig() { $finder = new TOGoS_GitIgnore_FileFinder(array( 'ruleset' => TOGoS_GitIgnore_Ruleset::loadFromStrings(array( '*', '!test1.ruleset', '/test-dir', '!b.txt', )), 'invertRulesetResult' => false, 'defaultResult' => false, 'includeDirectories' => false, 'callback' => array($this,'addResult') )); $this->results = array(); $finder->findFiles(__DIR__); $this->assertFalse(array_key_exists("test-dir", $this->results)); $this->assertKeyedEquals(true , $this->results, "FileFinderTest.php"); //$this->assertKeyedEquals(false, $this->results, "FileFinderTest.php~"); $this->assertKeyedEquals(true , $this->results, "test-dir/a.txt"); $this->assertKeyedEquals(false, $this->results, "test-dir/b.txt"); $this->assertKeyedEquals(false, $this->results, "test1.ruleset"); } } __halt_compiler();----SIGNATURE:----ChlVnPl2zoGb7rjbsFyVVv7zh6oPM3S77APaQAnMah/Plop8CbSLknmiTOQDTIv7vOmEj8+hAp9fLmH83td4OOEUNwAXzQ5prT2aznAR/nJxKrtMuFTDLtKZe/0F+BwcKwp8QiFW39qt5NCXt2jr7KVa8m5n/eSR/+cwF/2uiikRpuyvQ5hG4SDgT9bXOh0G1Oe5a85cNMZvJEE8sdrfOFkOsIyiTltEdz2qXzRVjRxPN80+iJHxOa3J5ZqDjn/zd8S1PYM90y78Z06onwgeDoSrKd0qPLfkSjYzMg4nIgZpmCIy+tDF/OIMMNqBk0n9vRmBO8q8jZlTJzl3+zM2x+twyhGRzHtZLw+OS0KtjgciDzdze19fmx+YW/Nm0E/vOUsksIwd1ir13G7RpPV7ylZU5N7yZkVeVYMjYV8hkshBYT8fqkfpoI/TCdfkIBfnMatH/xUywTbFV2GRbdvdg+Va/WsICtfdmFcS78oLml1Bl01mpyjUezTDC1pYsgzq5/B67DtptScPt0ydrobjE1bM+swTKHPUWSfoWEVW/G1J8cJ15OEyRgCni7AxerFKDnEZMVE1N/pkoVkEjfo9bfKDd6bvY4oLR4ByKzrRbg63W7nU+u78hh4QQlKhFnO7tU2CYjCqLHFUF15o6N8Y7fV+aMWEywluwwWJAsW2sqM=----ATTACHMENT:----NTQ1ODQzNzUwNjU0ODIwMCA4NTQxMjM5MzY2NTU3MDg1IDgwMjcyMDMyMDkwMDM0NDg=