@@ 817-826 (lines=10) @@ | ||
814 | /** |
|
815 | * @depends testDaoGeneration |
|
816 | */ |
|
817 | public function testArrayJsonEncode() |
|
818 | { |
|
819 | $userDao = new TestUserDao($this->tdbmService); |
|
820 | $users = $userDao->getUsersByLoginStartingWith('bill'); |
|
821 | ||
822 | $jsonEncoded = json_encode($users); |
|
823 | $msgDecoded = json_decode($jsonEncoded, true); |
|
824 | ||
825 | $this->assertCount(1, $msgDecoded); |
|
826 | } |
|
827 | ||
828 | /** |
|
829 | * @depends testDaoGeneration |
|
@@ 831-840 (lines=10) @@ | ||
828 | /** |
|
829 | * @depends testDaoGeneration |
|
830 | */ |
|
831 | public function testCursorJsonEncode() |
|
832 | { |
|
833 | $userDao = new TestUserDao($this->tdbmService); |
|
834 | $users = $userDao->getUsersByLoginStartingWith('bill', TDBMService::MODE_CURSOR); |
|
835 | ||
836 | $jsonEncoded = json_encode($users); |
|
837 | $msgDecoded = json_decode($jsonEncoded, true); |
|
838 | ||
839 | $this->assertCount(1, $msgDecoded); |
|
840 | } |
|
841 | ||
842 | /** |
|
843 | * @depends testDaoGeneration |
|
@@ 845-854 (lines=10) @@ | ||
842 | /** |
|
843 | * @depends testDaoGeneration |
|
844 | */ |
|
845 | public function testPageJsonEncode() |
|
846 | { |
|
847 | $userDao = new TestUserDao($this->tdbmService); |
|
848 | $users = $userDao->getUsersByLoginStartingWith('bill'); |
|
849 | ||
850 | $jsonEncoded = json_encode($users->take(0, 1)); |
|
851 | $msgDecoded = json_decode($jsonEncoded, true); |
|
852 | ||
853 | $this->assertCount(1, $msgDecoded); |
|
854 | } |
|
855 | ||
856 | /** |
|
857 | * @depends testDaoGeneration |