Esempio n. 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'));
 }
Esempio n. 2
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);
 }
Esempio n. 3
0
 /**
  * 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();
 }
Esempio n. 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);
 }
Esempio n. 5
0
 /**
  * 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');
 }
Esempio n. 6
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 env
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     $register = new ExtensionRegister();
     $register->loadFromArray(['Wasp\\Test\\DI\\Extension\\TestExtension']);
     parent::setUp();
 }
 /**
  * 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');
 }
Esempio n. 9
0
 /**
  * Set up test env
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     parent::setUp();
     $this->DI->get('command.loader')->fromArray($this->loadCommands());
 }
Esempio n. 10
0
 /**
  * Set up test env
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     $mock = new ServiceMockery('fixtures');
     $mock->add();
     parent::setUp();
 }
Esempio n. 11
0
 /**
  * Set up test env
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     $mock = new ServiceMockery('schema');
     $mock->add();
     parent::setUp();
 }
 /**
  * Set up test env
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     parent::setUp();
     $this->DI->get('connections')->add('func', array('driver' => 'pdo_mysql', 'user' => 'user', 'dbname' => 'wasp', 'models' => ENTITIES));
     $this->DI->get('connection')->connect('func');
 }
Esempio n. 13
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');
 }
Esempio n. 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'));
 }
Esempio n. 16
0
 /**
  * Tear down test env
  *
  * @return void
  * @author Dan Cox
  */
 public function tearDown()
 {
     parent::tearDown();
     $this->DI->get('schema')->dropTables();
 }
Esempio n. 17
0
 /**
  * Setup test env
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     $this->schema = m::mock('schema');
     $this->metadataFactory = m::mock('metadataFactory');
     parent::setUp();
 }
Esempio n. 18
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();
 }
Esempio n. 19
0
 /**
  * Set up test env
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     parent::setUp();
 }
Esempio n. 20
0
 /**
  * Set up test env
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     $mock = new ServiceMockery('response.file');
     $mock->add();
     parent::setUp();
 }
Esempio n. 21
0
 /**
  * Set up test env
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     parent::setUp();
     $this->DI->get('database')->create(ENTITIES);
 }
Esempio n. 22
0
 /**
  * Set up test class
  *
  * @return void
  * @author Dan Cox
  */
 public function setUp()
 {
     parent::setUp();
     $this->setupTemplates(__DIR__ . '/Templates/');
 }