custom_path.'/connectors.php')) { $this->custom_contents = file_get_contents($this->custom_path.'/connectors.php'); unlink($this->custom_path.'/connectors.php'); } else { mkdir_recursive($this->custom_path); } } function tearDown() { //remove connector file unlink($this->custom_path.'/connectors.php'); if(!empty($this->custom_contents)) { file_put_contents($this->custom_path.'/connectors.php', $this->custom_contents); } } function testConnectorFailsStringGracefully() { //now write a connector file with a string instead of an array for the connector var file_put_contents($this->custom_path.'/connectors.php',"assertInternalType(PHPUnit_Framework_Constraint_IsType::TYPE_ARRAY, $cu->getConnectors(true), 'ConnectorsUtils::getConnectors() failed to return an array when $connectors is a string'); } function testConnectorFailsNullGracefully() { //now write a connector file with missing array info instead of an array for the connector var file_put_contents($this->custom_path.'/connectors.php',"assertInternalType(PHPUnit_Framework_Constraint_IsType::TYPE_ARRAY, $cu->getConnectors(true), 'ConnectorsUtils::getConnectors() failed to return an array when connectors array was missing. '); } } ?>