| @@ 889-898 (lines=10) @@ | ||
| 886 | /** |
|
| 887 | * @depends testDaoGeneration |
|
| 888 | */ |
|
| 889 | public function testArrayJsonEncode() |
|
| 890 | { |
|
| 891 | $userDao = new TestUserDao($this->tdbmService); |
|
| 892 | $users = $userDao->getUsersByLoginStartingWith('bill'); |
|
| 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 testCursorJsonEncode() |
|
| 904 | { |
|
| 905 | $userDao = new TestUserDao($this->tdbmService); |
|
| 906 | $users = $userDao->getUsersByLoginStartingWith('bill', TDBMService::MODE_CURSOR); |
|
| 907 | ||
| 908 | $jsonEncoded = json_encode($users); |
|
| 909 | $msgDecoded = json_decode($jsonEncoded, true); |
|
| 910 | ||
| 911 | $this->assertCount(1, $msgDecoded); |
|
| 912 | } |
|
| 913 | ||
| 914 | /** |
|
| 915 | * @depends testDaoGeneration |
|
| @@ 917-926 (lines=10) @@ | ||
| 914 | /** |
|
| 915 | * @depends testDaoGeneration |
|
| 916 | */ |
|
| 917 | public function testPageJsonEncode() |
|
| 918 | { |
|
| 919 | $userDao = new TestUserDao($this->tdbmService); |
|
| 920 | $users = $userDao->getUsersByLoginStartingWith('bill'); |
|
| 921 | ||
| 922 | $jsonEncoded = json_encode($users->take(0, 1)); |
|
| 923 | $msgDecoded = json_decode($jsonEncoded, true); |
|
| 924 | ||
| 925 | $this->assertCount(1, $msgDecoded); |
|
| 926 | } |
|
| 927 | ||
| 928 | /** |
|
| 929 | * @depends testDaoGeneration |
|