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