@@ 876-885 (lines=10) @@ | ||
873 | /** |
|
874 | * @depends testDaoGeneration |
|
875 | */ |
|
876 | public function testArrayJsonEncode() |
|
877 | { |
|
878 | $userDao = new TestUserDao($this->tdbmService); |
|
879 | $users = $userDao->getUsersByLoginStartingWith('bill'); |
|
880 | ||
881 | $jsonEncoded = json_encode($users); |
|
882 | $msgDecoded = json_decode($jsonEncoded, true); |
|
883 | ||
884 | $this->assertCount(1, $msgDecoded); |
|
885 | } |
|
886 | ||
887 | /** |
|
888 | * @depends testDaoGeneration |
|
@@ 890-899 (lines=10) @@ | ||
887 | /** |
|
888 | * @depends testDaoGeneration |
|
889 | */ |
|
890 | public function testCursorJsonEncode() |
|
891 | { |
|
892 | $userDao = new TestUserDao($this->tdbmService); |
|
893 | $users = $userDao->getUsersByLoginStartingWith('bill', TDBMService::MODE_CURSOR); |
|
894 | ||
895 | $jsonEncoded = json_encode($users); |
|
896 | $msgDecoded = json_decode($jsonEncoded, true); |
|
897 | ||
898 | $this->assertCount(1, $msgDecoded); |
|
899 | } |
|
900 | ||
901 | /** |
|
902 | * @depends testDaoGeneration |
|
@@ 904-913 (lines=10) @@ | ||
901 | /** |
|
902 | * @depends testDaoGeneration |
|
903 | */ |
|
904 | public function testPageJsonEncode() |
|
905 | { |
|
906 | $userDao = new TestUserDao($this->tdbmService); |
|
907 | $users = $userDao->getUsersByLoginStartingWith('bill'); |
|
908 | ||
909 | $jsonEncoded = json_encode($users->take(0, 1)); |
|
910 | $msgDecoded = json_decode($jsonEncoded, true); |
|
911 | ||
912 | $this->assertCount(1, $msgDecoded); |
|
913 | } |
|
914 | ||
915 | /** |
|
916 | * @depends testDaoGeneration |