| @@ 811-820 (lines=10) @@ | ||
| 808 | /** |
|
| 809 | * @depends testDaoGeneration |
|
| 810 | */ |
|
| 811 | public function testArrayJsonEncode() |
|
| 812 | { |
|
| 813 | $userDao = new TestUserDao($this->tdbmService); |
|
| 814 | $users = $userDao->getUsersByLoginStartingWith('bill'); |
|
| 815 | ||
| 816 | $jsonEncoded = json_encode($users); |
|
| 817 | $msgDecoded = json_decode($jsonEncoded, true); |
|
| 818 | ||
| 819 | $this->assertCount(1, $msgDecoded); |
|
| 820 | } |
|
| 821 | ||
| 822 | /** |
|
| 823 | * @depends testDaoGeneration |
|
| @@ 825-834 (lines=10) @@ | ||
| 822 | /** |
|
| 823 | * @depends testDaoGeneration |
|
| 824 | */ |
|
| 825 | public function testCursorJsonEncode() |
|
| 826 | { |
|
| 827 | $userDao = new TestUserDao($this->tdbmService); |
|
| 828 | $users = $userDao->getUsersByLoginStartingWith('bill', TDBMService::MODE_CURSOR); |
|
| 829 | ||
| 830 | $jsonEncoded = json_encode($users); |
|
| 831 | $msgDecoded = json_decode($jsonEncoded, true); |
|
| 832 | ||
| 833 | $this->assertCount(1, $msgDecoded); |
|
| 834 | } |
|
| 835 | ||
| 836 | /** |
|
| 837 | * @depends testDaoGeneration |
|
| @@ 839-848 (lines=10) @@ | ||
| 836 | /** |
|
| 837 | * @depends testDaoGeneration |
|
| 838 | */ |
|
| 839 | public function testPageJsonEncode() |
|
| 840 | { |
|
| 841 | $userDao = new TestUserDao($this->tdbmService); |
|
| 842 | $users = $userDao->getUsersByLoginStartingWith('bill'); |
|
| 843 | ||
| 844 | $jsonEncoded = json_encode($users->take(0, 1)); |
|
| 845 | $msgDecoded = json_decode($jsonEncoded, true); |
|
| 846 | ||
| 847 | $this->assertCount(1, $msgDecoded); |
|
| 848 | } |
|
| 849 | ||
| 850 | /** |
|
| 851 | * @depends testDaoGeneration |
|