/** * @covers MyPackage\BaseManager::getRow * @todo Implement testGetRow(). */ public function testGetRow() { $member1 = $this->createMember(['email' => '*****@*****.**', 'member_name' => 'a', 'password' => 'aaa', 'icon_url' => 'http://hoge', 'photo_url' => 'http://fyga', 'is_enabled' => 1]); $sql = 'SELECT * FROM members WHERE is_enabled = 1 AND email = :email'; $params = ['email' => $member1->email]; $member = $this->object->getRow($sql, $params); $this->assertEquals($member->email, $member1->email); $member2 = $this->createMember(['email' => '*****@*****.**', 'member_name' => 'a', 'password' => 'aaa', 'icon_url' => 'http://hoge', 'photo_url' => 'http://fyga', 'is_enabled' => 0]); $sql = 'SELECT * FROM members WHERE is_enabled = 0 AND email = :email'; $params = ['email' => $member2->email]; $member = $this->object->getRow($sql, $params); $this->assertEquals($member->email, $member2->email); }