| @@ 857-866 (lines=10) @@ | ||
| 854 | /** |
|
| 855 | * @depends testDaoGeneration |
|
| 856 | */ |
|
| 857 | public function testArrayJsonEncode() |
|
| 858 | { |
|
| 859 | $userDao = new TestUserDao($this->tdbmService); |
|
| 860 | $users = $userDao->getUsersByLoginStartingWith('bill'); |
|
| 861 | ||
| 862 | $jsonEncoded = json_encode($users); |
|
| 863 | $msgDecoded = json_decode($jsonEncoded, true); |
|
| 864 | ||
| 865 | $this->assertCount(1, $msgDecoded); |
|
| 866 | } |
|
| 867 | ||
| 868 | /** |
|
| 869 | * @depends testDaoGeneration |
|
| @@ 871-880 (lines=10) @@ | ||
| 868 | /** |
|
| 869 | * @depends testDaoGeneration |
|
| 870 | */ |
|
| 871 | public function testCursorJsonEncode() |
|
| 872 | { |
|
| 873 | $userDao = new TestUserDao($this->tdbmService); |
|
| 874 | $users = $userDao->getUsersByLoginStartingWith('bill', TDBMService::MODE_CURSOR); |
|
| 875 | ||
| 876 | $jsonEncoded = json_encode($users); |
|
| 877 | $msgDecoded = json_decode($jsonEncoded, true); |
|
| 878 | ||
| 879 | $this->assertCount(1, $msgDecoded); |
|
| 880 | } |
|
| 881 | ||
| 882 | /** |
|
| 883 | * @depends testDaoGeneration |
|
| @@ 885-894 (lines=10) @@ | ||
| 882 | /** |
|
| 883 | * @depends testDaoGeneration |
|
| 884 | */ |
|
| 885 | public function testPageJsonEncode() |
|
| 886 | { |
|
| 887 | $userDao = new TestUserDao($this->tdbmService); |
|
| 888 | $users = $userDao->getUsersByLoginStartingWith('bill'); |
|
| 889 | ||
| 890 | $jsonEncoded = json_encode($users->take(0, 1)); |
|
| 891 | $msgDecoded = json_decode($jsonEncoded, true); |
|
| 892 | ||
| 893 | $this->assertCount(1, $msgDecoded); |
|
| 894 | } |
|
| 895 | ||
| 896 | /** |
|
| 897 | * @depends testDaoGeneration |
|