diff --git a/tests/Parse/ParseACLTest.php b/tests/Parse/ParseACLTest.php index bd768aab..349a0950 100644 --- a/tests/Parse/ParseACLTest.php +++ b/tests/Parse/ParseACLTest.php @@ -352,6 +352,7 @@ public function testACLRequiresObjectId() $this->fail('Exception should have thrown'); } catch (Exception $e) { } + $this->assertTrue(true); } public function testIncludedObjectsGetACLs() diff --git a/tests/Parse/ParseMemoryStorageTest.php b/tests/Parse/ParseMemoryStorageTest.php index fd1a46b3..c552c51e 100644 --- a/tests/Parse/ParseMemoryStorageTest.php +++ b/tests/Parse/ParseMemoryStorageTest.php @@ -71,5 +71,6 @@ public function testSave() { // does nothing self::$parseStorage->save(); + $this->assertTrue(true); } } diff --git a/tests/Parse/ParseObjectTest.php b/tests/Parse/ParseObjectTest.php index 6f2b5832..becddca6 100644 --- a/tests/Parse/ParseObjectTest.php +++ b/tests/Parse/ParseObjectTest.php @@ -45,6 +45,7 @@ public function testCreate() $obj = ParseObject::create('TestObject'); $obj->set('test', 'test'); $obj->save(); + $this->assertEquals($obj->get('test'), 'test'); } public function testUpdate() @@ -649,6 +650,7 @@ public function testManySaveAfterAFailure() if ($exceptions != 3) { $this->fail('Did not cause expected # of exceptions.'); } + $this->assertTrue(true); } public function testNewKeyIsDirtyAfterSave() @@ -865,6 +867,7 @@ public function testArraySetAndAdd() $obj->save(); $obj->add('arrayfield', ['c', 'd', 'e']); $obj->save(); + $this->assertEquals($obj->get('arrayfield'), ['a', 'b', 'c', 'd', 'e']); } public function testObjectIsDirty() @@ -1443,6 +1446,7 @@ public function testDestroyingUnsaved() { $obj = new ParseObject('TestClass'); $obj->destroy(); + $this->assertTrue(true); } public function testEncodeWithArray() diff --git a/tests/Parse/ParsePushTest.php b/tests/Parse/ParsePushTest.php index 7caa0ff0..f28502c0 100644 --- a/tests/Parse/ParsePushTest.php +++ b/tests/Parse/ParsePushTest.php @@ -34,13 +34,14 @@ public function testNoMasterKey() public function testBasicPush() { - ParsePush::send( + $response = ParsePush::send( [ 'channels' => [''], 'data' => ['alert' => 'sample message'], ], true ); + $this->assertEquals($response['result'], 1); } /** @@ -89,25 +90,27 @@ public function testPushToQuery() { $query = ParseInstallation::query(); $query->equalTo('key', 'value'); - ParsePush::send( + $response = ParsePush::send( [ 'data' => ['alert' => 'iPhone 5 is out!'], 'where' => $query, ], true ); + $this->assertEquals($response['result'], 1); } public function testPushToQueryWithoutWhere() { $query = ParseInstallation::query(); - ParsePush::send( + $response = ParsePush::send( [ 'data' => ['alert' => 'Done without conditions!'], 'where' => $query, ], true ); + $this->assertEquals($response['result'], 1); } public function testNonQueryWhere() @@ -127,7 +130,7 @@ public function testNonQueryWhere() public function testPushDates() { - ParsePush::send( + $response = ParsePush::send( [ 'data' => ['alert' => 'iPhone 5 is out!'], 'push_time' => new \DateTime(), @@ -136,6 +139,7 @@ public function testPushDates() ], true ); + $this->assertEquals($response['result'], 1); } public function testExpirationTimeAndIntervalSet() diff --git a/tests/Parse/ParseRelationOperationTest.php b/tests/Parse/ParseRelationOperationTest.php index dc9b4a45..86f20a16 100644 --- a/tests/Parse/ParseRelationOperationTest.php +++ b/tests/Parse/ParseRelationOperationTest.php @@ -172,5 +172,6 @@ public function testRemoveMissingObjectId() $obj = new ParseObject('Class1'); $op = new ParseRelationOperation(null, $obj); $op->_mergeWithPrevious(new ParseRelationOperation(null, $obj)); + $this->assertTrue(true); } } diff --git a/tests/Parse/ParseRelationTest.php b/tests/Parse/ParseRelationTest.php index 91180258..bcff4049 100644 --- a/tests/Parse/ParseRelationTest.php +++ b/tests/Parse/ParseRelationTest.php @@ -217,5 +217,8 @@ public function testBiDirectionalRelations() $child2->save(); $parent->save(); + $this->assertEquals($parent->get('children'), [$child, $child2]); + $this->assertEquals($child->get('parent'), $parent); + $this->assertEquals($child2->get('parent'), $parent); } } diff --git a/tests/Parse/ParseRoleTest.php b/tests/Parse/ParseRoleTest.php index 7e40f8e6..09d2c5fc 100644 --- a/tests/Parse/ParseRoleTest.php +++ b/tests/Parse/ParseRoleTest.php @@ -167,8 +167,8 @@ public function testRoleHierarchyAndPropagation() // verify the snake can still enter the garden ParseUser::logIn('snake', 'snake'); - $query->get($eden['garden']->getObjectId()); - + $garden = $query->get($eden['garden']->getObjectId()); + $this->assertEquals($garden->getObjectId(), $eden['garden']->getObjectId()); ParseUser::logOut(); } @@ -184,7 +184,8 @@ public function testAddUserAfterFetch() $roleAgain = $query->get($role->getObjectId()); $roleAgain->getUsers()->add($user); $roleAgain->save(); - + $users = $roleAgain->getUsers()->getQuery()->find(); + $this->assertEquals($user->getObjectId(), $users[0]->getObjectId()); ParseUser::logOut(); } diff --git a/tests/Parse/ParseSchemaTest.php b/tests/Parse/ParseSchemaTest.php index 3b0822ef..24a3fbe2 100644 --- a/tests/Parse/ParseSchemaTest.php +++ b/tests/Parse/ParseSchemaTest.php @@ -266,6 +266,7 @@ public function testPurgingNonexistentSchema() // exception on earlier versions > 2.8, no exception on >= 2.8 // thus hard to test for this unless version detection is utilized here } + $this->assertTrue(true); } public function testDeleteSchema() diff --git a/tests/Parse/ParseSessionStorageTest.php b/tests/Parse/ParseSessionStorageTest.php index 7a3516a3..06877468 100644 --- a/tests/Parse/ParseSessionStorageTest.php +++ b/tests/Parse/ParseSessionStorageTest.php @@ -86,6 +86,7 @@ public function testSave() { // does nothing self::$parseStorage->save(); + $this->assertTrue(true); } /** diff --git a/tests/Parse/ParseUserTest.php b/tests/Parse/ParseUserTest.php index 358453b5..5e600115 100644 --- a/tests/Parse/ParseUserTest.php +++ b/tests/Parse/ParseUserTest.php @@ -457,6 +457,7 @@ public function testPasswordReset() $user->signUp(); ParseUser::requestPasswordReset('asdf@example.com'); + $this->assertTrue(true); } public function testUserAssociations() @@ -712,6 +713,7 @@ public function testRequestVerificationEmail() $user->setEmail($email); $user->signUp(); ParseUser::requestVerificationEmail($email); + $this->assertTrue(true); } /**