コード例 #1
0
 /**
  * Tests the from method with expected good inputs.
  */
 public function testFromWithGoodInput()
 {
     $instance = new JDatabaseImporterMysql();
     $result = $instance->from('foobar');
     $this->assertThat($result, $this->identicalTo($instance), 'from must return an object to support chaining.');
     $this->assertThat(TestReflection::getValue($instance, 'from'), $this->equalTo('foobar'), 'The from method did not store the value as expected.');
 }
 /**
  * Tests the from method with expected good inputs.
  *
  * @return void
  *
  * @since  11.1
  */
 public function testFromWithGoodInput()
 {
     $instance = new JDatabaseImporterMysql();
     try {
         $result = $instance->from('foobar');
         $this->assertThat($result, $this->identicalTo($instance), 'from must return an object to support chaining.');
         $this->assertThat(TestReflection::getValue($instance, 'from'), $this->equalTo('foobar'), 'The from method did not store the value as expected.');
     } catch (Exception $e) {
         $this->fail('From method should not throw exception with good input: ' . $e->getMessage());
     }
 }