Add importers in console and admin for flights/aircraft/subfleets and airport #194

This commit is contained in:
Nabeel Shahzad
2018-03-20 19:17:11 -05:00
parent 782121829a
commit b9beb6c804
41 changed files with 1270 additions and 225 deletions

View File

@@ -92,6 +92,24 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
}
}
/**
* So we can test private/protected methods
* http://bit.ly/1mr5hMq
* @param $object
* @param $methodName
* @param array $parameters
* @return mixed
* @throws ReflectionException
*/
public function invokeMethod(&$object, $methodName, array $parameters = [])
{
$reflection = new \ReflectionClass(get_class($object));
$method = $reflection->getMethod($methodName);
$method->setAccessible(true);
return $method->invokeArgs($object, $parameters);
}
/**
* Override the GET call to inject the user API key
* @param string $uri