예제 #1
0
 /**
  * The queue name is inserted if no name is given
  *
  * @depends	testInterface
  * @return	null
  */
 public function testGetAdapterData()
 {
     /* the default array used when non is given */
     $expected = $this->adapterData;
     $this->assertEquals($expected, $this->task->getAdapterData());
     $expected = array_values($expected);
     $this->assertEquals($expected, $this->task->getAdapterValues());
 }
예제 #2
0
 /**
  * The abstract class makes no attempt to validate or modify the adapter
  * data that is put in. The concrete classes extend the setAdapterData for
  * that purpose. So here we will show whatever array you put in is what
  * you get out.
  * 
  * @depends	testInterface
  * @return	null
  */
 public function testGetAdapterDataGetAdapterValues()
 {
     $this->assertEquals(array(), $this->task->getAdapterData());
     $this->assertEquals(array(), $this->task->getAdapterValues());
     $data = array('key' => 'value');
     $task = $this->getMockBuilder($this->taskClass)->setConstructorArgs(array($this->profile, $data))->getMockForAbstractClass();
     $this->assertEquals($data, $task->getAdapterData());
     $this->assertEquals(array('value'), $task->getAdapterValues());
     $data = array();
     $task = $this->getMockBuilder($this->taskClass)->setConstructorArgs(array($this->profile, $data))->getMockForAbstractClass();
     $this->assertEquals($data, $task->getAdapterData());
     $this->assertEquals(array(), $task->getAdapterValues());
     $data = array(1, 2, 3);
     $task = $this->getMockBuilder($this->taskClass)->setConstructorArgs(array($this->profile, $data))->getMockForAbstractClass();
     $this->assertEquals($data, $task->getAdapterData());
     $this->assertEquals($data, $task->getAdapterData());
 }