コード例 #1
0
 /**
  * @test
  */
 public function source()
 {
     $this->dummy->setSource('source', 1, 2);
     $source = $this->dummy->getSource();
     $this->assertThat($source, $this->isInstanceOf(Source::class));
     $this->assertThat($source->relativePath, $this->equalTo('source'));
     $this->assertThat($source->line, $this->equalTo(1));
     $this->assertThat($source->col, $this->equalTo(2));
 }
コード例 #2
0
 /**
  * @test
  */
 function SQL生成でwhere句を指定したパターンその2()
 {
     $dao = DummyEntity::DAO();
     $this->assertTrue($dao instanceof DummyEntityDAO);
     $obj = new DummyEntity();
     $obj->setUserId(100);
     $obj->setType(90);
     $dao->findHogeHoge2($obj);
     $this->assertContains("userId = :userId AND hoge_type = :type", $dao->last_query);
     $this->assertEquals(100, $dao->last_binds[":userId"]);
     $this->assertEquals(90, $dao->last_binds[":type"]);
 }