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