Integration tests are for determining that different parts of the framework will work together (integrate) as expected. An example of a common integration test would be for ensuring that an adapter interacts correctly with the class it is designed to interface with. Example: the Session class and the Php adapter. Unit tests will ensure that both the Session and Php classes behave correctly under isolation, while an integration test ensures that the two classes interact and interface correctly.
Inheritance: extends Unit
Exemplo n.º 1
0
 public function skipIf($condition, $message = false)
 {
     if ($message === false) {
         $type = $this->_dbConfig['adapter'];
         $type = $type ?: $this->_dbConfig['type'];
         $class = basename(str_replace('\\', '/', get_called_class()));
         $callers = debug_backtrace();
         $caller = $callers[1]['function'];
         $method = $caller !== 'skip' ? "{$class}::" . $caller : $class;
         $message = "`{$method}` Not supported by the `'{$type}'` adapter";
     }
     return parent::skipIf($condition, $message);
 }
Exemplo n.º 2
0
 public function __construct(array $config = array())
 {
     $defaults = array('host' => '127.0.0.1', 'port' => 6379);
     parent::__construct($config + $defaults);
 }