| @@ 833-842 (lines=10) @@ | ||
| 830 | /** |
|
| 831 | * @depends testDaoGeneration |
|
| 832 | */ |
|
| 833 | public function testArrayJsonEncode() |
|
| 834 | { |
|
| 835 | $userDao = new TestUserDao($this->tdbmService); |
|
| 836 | $users = $userDao->getUsersByLoginStartingWith('bill'); |
|
| 837 | ||
| 838 | $jsonEncoded = json_encode($users); |
|
| 839 | $msgDecoded = json_decode($jsonEncoded, true); |
|
| 840 | ||
| 841 | $this->assertCount(1, $msgDecoded); |
|
| 842 | } |
|
| 843 | ||
| 844 | /** |
|
| 845 | * @depends testDaoGeneration |
|
| @@ 847-856 (lines=10) @@ | ||
| 844 | /** |
|
| 845 | * @depends testDaoGeneration |
|
| 846 | */ |
|
| 847 | public function testCursorJsonEncode() |
|
| 848 | { |
|
| 849 | $userDao = new TestUserDao($this->tdbmService); |
|
| 850 | $users = $userDao->getUsersByLoginStartingWith('bill', TDBMService::MODE_CURSOR); |
|
| 851 | ||
| 852 | $jsonEncoded = json_encode($users); |
|
| 853 | $msgDecoded = json_decode($jsonEncoded, true); |
|
| 854 | ||
| 855 | $this->assertCount(1, $msgDecoded); |
|
| 856 | } |
|
| 857 | ||
| 858 | /** |
|
| 859 | * @depends testDaoGeneration |
|
| @@ 861-870 (lines=10) @@ | ||
| 858 | /** |
|
| 859 | * @depends testDaoGeneration |
|
| 860 | */ |
|
| 861 | public function testPageJsonEncode() |
|
| 862 | { |
|
| 863 | $userDao = new TestUserDao($this->tdbmService); |
|
| 864 | $users = $userDao->getUsersByLoginStartingWith('bill'); |
|
| 865 | ||
| 866 | $jsonEncoded = json_encode($users->take(0, 1)); |
|
| 867 | $msgDecoded = json_decode($jsonEncoded, true); |
|
| 868 | ||
| 869 | $this->assertCount(1, $msgDecoded); |
|
| 870 | } |
|
| 871 | ||
| 872 | /** |
|
| 873 | * @depends testDaoGeneration |
|