Example #1
0
 /**
  * Setup test env
  *
  * @return void
  * @author Dan Cox
  **/
 public function setUp()
 {
     parent::setUp();
     // Add a new route;
     $this->DI->get('route')->add('test.url', '/url', array('controller' => 'Test::Test'));
     $this->DI->get('route')->add('test.post', '/url', array('controller' => 'Test::post'));
 }
Example #2
0
 /**
  * Set up test env
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     parent::setUp();
     // add a connection
     $this->DI->get('connections')->add('func', ['driver' => 'pdo_mysql', 'user' => 'user', 'dbname' => 'wasp', 'models' => ENTITIES]);
     $this->DI->get('connection')->connect('func');
 }
Example #3
0
 /**
  * Set up test scenario
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     parent::setUp();
     $object = new StdClass();
     $object->test = 'var';
     $this->collectable = array('test' => 'var', 'foo' => array('bar', 'zim'), 'testObj' => $object);
 }
Example #4
0
 /**
  * Set up test environment
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     parent::setUp();
     // The route we use.
     $this->DI->get('route')->add('form.test', '/form/test', array('GET'));
     // Setup the DB
     $this->DI->get('database')->create(ENTITIES);
 }
 /**
  * Setup test env
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     // Create the Service Mockerys before running the parent setup
     $this->returnStub = new STDClass();
     $this->returnStub->foo = 'bar';
     $this->builderStub = m::mock('queryBuilder');
     parent::setUp();
 }
 /**
  * Set up test env
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     parent::setUp();
     // Set up the test DB
     $this->DI->get('database')->create(ENTITIES);
     // Add a resource route
     $this->DI->get('route')->resource('test', '/test', 'Wasp\\Test\\Entity\\Entities\\Contact');
     $this->contact = $this->DI->get('entity')->load('Wasp\\Test\\Entity\\Entities\\Contact');
 }
Example #7
0
 /**
  * Set up test env
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     parent::setUp();
     $this->DI->get('database')->create(ENTITIES);
     // Inserting 50 test contacts
     for ($i = 0; $i < 51; $i++) {
         $ent = $this->DI->get('entity')->load('Wasp\\Test\\Entity\\Entities\\Contact');
         $ent->name = 'Test ' . $i;
         $ent->message = 'TestMessage_' . $i;
         $ent->save();
     }
     $this->contact = $this->DI->get('entity')->load('Wasp\\Test\\Entity\\Entities\\Contact');
 }
 /**
  * Set up test class
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     parent::setUp();
     $this->DI->get('database')->create(ENTITIES);
     $this->test = $this->DI->get('entity')->load('Wasp\\Test\\Entity\\Entities\\Test');
 }
Example #9
0
 /**
  * Set up test env
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     parent::setUp();
     $this->DI->get('command.loader')->fromArray($this->loadCommands());
 }
 /**
  * Set up test env
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     $mock = new ServiceMockery('fixtures');
     $mock->add();
     parent::setUp();
 }
Example #11
0
 /**
  * Set up test env
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     $mock = new ServiceMockery('schema');
     $mock->add();
     parent::setUp();
 }
Example #12
0
 /**
  * Setup test env
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     $dbMock = new ServiceMockery('database');
     $dbMock->add();
     parent::setUp();
 }
 /**
  * Set up test env
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     parent::setUp();
     $this->DI->get('route')->resource('test', '/test', 'Wasp\\Test\\Entity\\Entities\\Contact');
 }
 /**
  * Set up test env
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     $register = new ExtensionRegister();
     $register->loadFromArray(['Wasp\\Test\\DI\\Extension\\TestExtension']);
     parent::setUp();
 }
Example #15
0
 /**
  * Set up test env
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     parent::setUp();
     $this->DI->get('route')->add('dom.test', '/dom/test', array('GET'), array('_controller' => 'Wasp\\Test\\Controller\\Controller::returnHtml'));
 }
Example #16
0
 /**
  * Setup test env
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     $this->schema = m::mock('schema');
     $this->metadataFactory = m::mock('metadataFactory');
     parent::setUp();
 }
Example #17
0
 /**
  * Setup test env
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     parent::setUp();
     $request = $this->DI->get('request')->make('/test', 'POST', array('foo' => 'bar'));
     $response = $this->DI->get('response')->persistInput();
 }
Example #18
0
 /**
  * Set up test env
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     parent::setUp();
 }
Example #19
0
 /**
  * Set up test env
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     $mock = new ServiceMockery('response.file');
     $mock->add();
     parent::setUp();
 }
Example #20
0
 /**
  * Set up test env
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     parent::setUp();
     $this->DI->get('database')->create(ENTITIES);
 }
Example #21
0
 /**
  * Set up test class
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     parent::setUp();
     $this->setupTemplates(__DIR__ . '/Templates/');
 }