Skip to content

Commit

Permalink
Clean test classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeckerson committed Jul 9, 2023
1 parent 6e4a8f3 commit c081436
Show file tree
Hide file tree
Showing 43 changed files with 95 additions and 210 deletions.
5 changes: 2 additions & 3 deletions tests/integration/Collection/AppendMessageCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@
namespace Phalcon\Incubator\MongoDB\Mvc\Test\Integration\Collection;

use IntegrationTester;
use Phalcon\Incubator\MongoDB\Mvc\Collection\Exception;
use Phalcon\Messages\MessageInterface;
use Phalcon\Incubator\MongoDB\Test\Fixtures\Mvc\Collections\Robots;
use Phalcon\Incubator\MongoDB\Test\Fixtures\Traits\DiTrait;

/**
* Class AppendMessageCest
*/
class AppendMessageCest
{
use DiTrait;
Expand All @@ -36,6 +34,7 @@ public function _before()
* Tests Phalcon\Mvc\Collection :: appendMessage()
*
* @param IntegrationTester $I
* @throws Exception
* @since 2018-11-13
* @author Phalcon Team <team@phalcon.io>
*/
Expand Down
3 changes: 0 additions & 3 deletions tests/integration/Collection/AssignCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
use Phalcon\Incubator\MongoDB\Test\Fixtures\Mvc\Collections\SuperRobots;
use Phalcon\Incubator\MongoDB\Test\Fixtures\Traits\DiTrait;

/**
* Class AssignCest
*/
class AssignCest
{
use DiTrait;
Expand Down
3 changes: 0 additions & 3 deletions tests/integration/Collection/Behavior/ConstructCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@

use IntegrationTester;

/**
* Class ConstructCest
*/
class ConstructCest
{
/**
Expand Down
3 changes: 0 additions & 3 deletions tests/integration/Collection/Behavior/MissingMethodCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@

use IntegrationTester;

/**
* Class MissingMethodCest
*/
class MissingMethodCest
{
/**
Expand Down
3 changes: 0 additions & 3 deletions tests/integration/Collection/Behavior/NotifyCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@

use IntegrationTester;

/**
* Class NotifyCest
*/
class NotifyCest
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@

use IntegrationTester;

/**
* Class ConstructCest
*/
class ConstructCest
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@

use IntegrationTester;

/**
* Class MissingMethodCest
*/
class MissingMethodCest
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@

use IntegrationTester;

/**
* Class NotifyCest
*/
class NotifyCest
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@

use IntegrationTester;

/**
* Class ConstructCest
*/
class ConstructCest
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@

use IntegrationTester;

/**
* Class MissingMethodCest
*/
class MissingMethodCest
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@

use IntegrationTester;

/**
* Class NotifyCest
*/
class NotifyCest
{
/**
Expand Down
5 changes: 2 additions & 3 deletions tests/integration/Collection/CloneResultCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@

use IntegrationTester;
use MongoDB\Database;
use Phalcon\Incubator\MongoDB\Mvc\Collection\Exception;
use Phalcon\Incubator\MongoDB\Test\Fixtures\Mvc\Collections\Robots;
use Phalcon\Incubator\MongoDB\Test\Fixtures\Traits\DiTrait;

/**
* Class CloneResultCest
*/
class CloneResultCest
{
use DiTrait;
Expand Down Expand Up @@ -52,6 +50,7 @@ public function _before()
* Tests Phalcon\Mvc\Collection :: cloneResult()
*
* @param IntegrationTester $I
* @throws Exception
* @since 2018-11-13
* @author Phalcon Team <team@phalcon.io>
*/
Expand Down
3 changes: 0 additions & 3 deletions tests/integration/Collection/ConstructCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
use Phalcon\Incubator\MongoDB\Test\Fixtures\Mvc\Collections\Robots;
use Phalcon\Incubator\MongoDB\Test\Fixtures\Traits\DiTrait;

/**
* Class ConstructCest
*/
class ConstructCest
{
use DiTrait;
Expand Down
11 changes: 4 additions & 7 deletions tests/integration/Collection/CountCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,17 @@

use IntegrationTester;
use MongoDB\Database;
use Phalcon\Incubator\MongoDB\Mvc\Collection\Exception;
use Phalcon\Incubator\MongoDB\Test\Fixtures\Mvc\Collections\Robots;
use Phalcon\Incubator\MongoDB\Test\Fixtures\Traits\DiTrait;

/**
* Class CountCest
*/
class CountCest
{
use DiTrait;

/** @var string $source */
private $source;
private string $source;

/** @var Database $mongo */
private $mongo;
private Database $mongo;

public function _before()
{
Expand Down Expand Up @@ -70,6 +66,7 @@ public function _before()
* Tests Phalcon\Mvc\Collection :: count()
*
* @param IntegrationTester $I
* @throws Exception
* @since 2018-11-13
* @author Phalcon Team <team@phalcon.io>
*/
Expand Down
10 changes: 4 additions & 6 deletions tests/integration/Collection/CreateCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,17 @@

use IntegrationTester;
use MongoDB\Database;
use Phalcon\Incubator\MongoDB\Mvc\Collection\Exception;
use Phalcon\Incubator\MongoDB\Test\Fixtures\Mvc\Collections\Robots;
use Phalcon\Incubator\MongoDB\Test\Fixtures\Traits\DiTrait;

/**
* Class CreateCest
*/
class CreateCest
{
use DiTrait;

private $source;
private string $source;

/** @var Database $mongo */
private $mongo;
private Database $mongo;

public function _before()
{
Expand All @@ -44,6 +41,7 @@ public function _before()
* Tests Phalcon\Mvc\Collection :: create()
*
* @param IntegrationTester $I
* @throws Exception
* @since 2018-11-13
* @author Phalcon Team <team@phalcon.io>
*/
Expand Down
5 changes: 2 additions & 3 deletions tests/integration/Collection/DeleteCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@

use IntegrationTester;
use MongoDB\Database;
use Phalcon\Incubator\MongoDB\Mvc\Collection\Exception;
use Phalcon\Incubator\MongoDB\Test\Fixtures\Mvc\Collections\Robots;
use Phalcon\Incubator\MongoDB\Test\Fixtures\Traits\DiTrait;

/**
* Class DeleteCest
*/
class DeleteCest
{
use DiTrait;
Expand Down Expand Up @@ -58,6 +56,7 @@ public function _before()
* Tests Phalcon\Mvc\Collection :: delete()
*
* @param IntegrationTester $I
* @throws Exception
* @since 2018-11-13
* @author Phalcon Team <team@phalcon.io>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function mvcCollectionDocumentJsonSerializeCest(IntegrationTester $I)
$parts = [
'id' => new ObjectId(),
'date' => null,
'common_name' => 'Henry'
'common_name' => 'Henry',
];

$robotPart = new RobotPart($parts);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function mvcCollectionDocumentOffsetExists(IntegrationTester $I)

$parts = [
'id' => $robot->getId(),
'common_name' => $robot->first_name . ' ' . $robot->last_name
'common_name' => $robot->first_name . ' ' . $robot->last_name,
];

$robotPart = new RobotPart($parts);
Expand Down
14 changes: 5 additions & 9 deletions tests/integration/Collection/FindByIdCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,19 @@
use IntegrationTester;
use MongoDB\BSON\ObjectId;
use MongoDB\Database;
use Phalcon\Incubator\MongoDB\Mvc\Collection\Exception;
use Phalcon\Incubator\MongoDB\Test\Fixtures\Mvc\Collections\Robots;
use Phalcon\Incubator\MongoDB\Test\Fixtures\Traits\DiTrait;

/**
* Class FindByIdCest
*/
class FindByIdCest
{
use DiTrait;

/** @var string $source */
private $source;
private string $source;

/** @var Database $mongo */
private $mongo;
private Database $mongo;

/** @var ObjectId $tmpId */
private $tmpId;
private ObjectId $tmpId;

public function _before()
{
Expand Down Expand Up @@ -64,6 +59,7 @@ public function _before()
* Tests Phalcon\Mvc\Collection :: findById()
*
* @param IntegrationTester $I
* @throws Exception
* @since 2018-11-13
* @author Phalcon Team <team@phalcon.io>
*/
Expand Down
11 changes: 4 additions & 7 deletions tests/integration/Collection/FindCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,17 @@

use IntegrationTester;
use MongoDB\Database;
use Phalcon\Incubator\MongoDB\Mvc\Collection\Exception;
use Phalcon\Incubator\MongoDB\Test\Fixtures\Mvc\Collections\Robots;
use Phalcon\Incubator\MongoDB\Test\Fixtures\Traits\DiTrait;

/**
* Class FindCest
*/
class FindCest
{
use DiTrait;

/** @var string $source */
private $source;
private string $source;

/** @var Database $mongo */
private $mongo;
private Database $mongo;

public function _before()
{
Expand Down Expand Up @@ -62,6 +58,7 @@ public function _before()
* Tests Phalcon\Mvc\Collection :: find()
*
* @param IntegrationTester $I
* @throws Exception
* @since 2018-11-13
* @author Phalcon Team <team@phalcon.io>
*/
Expand Down
3 changes: 0 additions & 3 deletions tests/integration/Collection/FindFirstCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
use Phalcon\Incubator\MongoDB\Test\Fixtures\Mvc\Collections\Robots;
use Phalcon\Incubator\MongoDB\Test\Fixtures\Traits\DiTrait;

/**
* Class FindFirstCest
*/
class FindFirstCest
{
use DiTrait;
Expand Down
5 changes: 1 addition & 4 deletions tests/integration/Collection/FireEventCancelCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@

use IntegrationTester;

/**
* Class FireEventCancelCest
*/
class FireEventCancelCest
{
/**
Expand All @@ -30,5 +27,5 @@ class FireEventCancelCest
public function mvcCollectionFireEventCancel(IntegrationTester $I)
{
$I->wantToTest('Mvc\Collection - fireEventCancel()');
}
}
}
3 changes: 0 additions & 3 deletions tests/integration/Collection/FireEventCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@

use IntegrationTester;

/**
* Class FireEventCest
*/
class FireEventCest
{
/**
Expand Down
3 changes: 0 additions & 3 deletions tests/integration/Collection/GetCollectionManagerCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
use Phalcon\Incubator\MongoDB\Test\Fixtures\Mvc\Collections\Robots;
use Phalcon\Incubator\MongoDB\Test\Fixtures\Traits\DiTrait;

/**
* Class GetCollectionManagerCest
*/
class GetCollectionManagerCest
{
use DiTrait;
Expand Down
3 changes: 0 additions & 3 deletions tests/integration/Collection/GetConnectionCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
use Phalcon\Incubator\MongoDB\Test\Fixtures\Mvc\Collections\Robots;
use Phalcon\Incubator\MongoDB\Test\Fixtures\Traits\DiTrait;

/**
* Class GetConnectionCest
*/
class GetConnectionCest
{
use DiTrait;
Expand Down
3 changes: 0 additions & 3 deletions tests/integration/Collection/GetConnectionServiceCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
use Phalcon\Incubator\MongoDB\Test\Fixtures\Mvc\Collections\Robots;
use Phalcon\Incubator\MongoDB\Test\Fixtures\Traits\DiTrait;

/**
* Class GetConnectionServiceCest
*/
class GetConnectionServiceCest
{
use DiTrait;
Expand Down
Loading

0 comments on commit c081436

Please sign in to comment.