Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump dama/doctrine-test-bundle from 5.0.3 to 6.0.0 #704

Merged
merged 1 commit into from Jul 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -11,6 +11,7 @@ composer.phar
.*.swp
bin
.web-server-pid
.phpunit.result.cache
node_modules
assets/js/fos_js_routes.json
coverage.xml
4 changes: 3 additions & 1 deletion composer.json
Expand Up @@ -33,6 +33,7 @@
"minimum-stability": "stable",
"name": "camdram/camdram",
"replace": {
"phpunit/phpunit": "8.2.4",
"symfony/polyfill-php56": "1.99",
"symfony/polyfill-php70": "1.99",
"symfony/polyfill-php71": "1.99",
Expand Down Expand Up @@ -75,7 +76,8 @@
"zendframework/zend-feed": "2.12.*"
},
"require-dev": {
"dama/doctrine-test-bundle": "^5.0",
"dama/doctrine-test-bundle": "^6.0",
"dms/phpunit-arraysubset-asserts": "^0.1.0",
"sensio/generator-bundle": "^3.1",
"symfony/phpunit-bridge": "^4.1",
"symfony/web-server-bundle": "^3.4"
Expand Down
69 changes: 55 additions & 14 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion runtests
@@ -1,6 +1,6 @@
#!/bin/bash
set -e
export SYMFONY_PHPUNIT_VERSION=6.5
export SYMFONY_PHPUNIT_VERSION=8.2.4
export SYMFONY_DEPRECATIONS_HELPER="max[self]=0"
export SYMFONY_ENV=test

Expand Down
2 changes: 1 addition & 1 deletion tests/CamdramAdminBundle/Service/UserMergerTest.php
Expand Up @@ -15,7 +15,7 @@ class UserMergerTest extends RepositoryTestCase
private $person;
private $ace;

public function setUp()
public function setUp(): void
{
parent::setUp();

Expand Down
6 changes: 3 additions & 3 deletions tests/CamdramBundle/Controller/ContactUsControllerTest.php
Expand Up @@ -26,12 +26,12 @@ public function testSendMessage()
$this->assertSame(1, $mailCollector->getMessageCount());

$message = $mailCollector->getMessages()[0];
$this->assertContains('Test Message', $message->getSubject());
$this->assertStringContainsString('Test Message', $message->getSubject());
$this->assertSame('john@domain.com', key($message->getReplyTo()));
$recipient = $client->getKernel()->getContainer()->getParameter('support_email_address');
$this->assertSame($recipient, key($message->getFrom()));
$this->assertSame($recipient, key($message->getTo()));
$this->assertContains('Lorem ipsum', $message->getBody());
$this->assertStringContainsString('Lorem ipsum', $message->getBody());
}

}
}
2 changes: 1 addition & 1 deletion tests/CamdramBundle/Controller/DiaryControllerTest.php
Expand Up @@ -13,7 +13,7 @@
class DiaryControllerTest extends RestTestCase
{

public function setUp()
public function setUp(): void
{
parent::setUp();

Expand Down
4 changes: 2 additions & 2 deletions tests/CamdramBundle/Controller/SearchControllerTest.php
Expand Up @@ -30,7 +30,7 @@ class SearchControllerTest extends WebTestCase
*/
private $user;

public function setUp()
public function setUp(): void
{
$this->client = self::createClient(array('environment' => 'test'));

Expand Down Expand Up @@ -122,7 +122,7 @@ private function doJsonRequest($url, $params)

$response = $this->client->getResponse();
$this->assertEquals(200, $response->getStatusCode());
$this->assertContains('application/json', $response->headers->get('Content-Type'));
$this->assertStringContainsString('application/json', $response->headers->get('Content-Type'));

return json_decode($response->getContent(), true);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/CamdramBundle/Controller/ShowControllerTest.php
Expand Up @@ -15,7 +15,7 @@ class ShowControllerTest extends RestTestCase
*/
private $show;

public function setUp()
public function setUp(): void
{
parent::setUp();

Expand Down
4 changes: 2 additions & 2 deletions tests/CamdramBundle/Controller/SigninsheetControllerTest.php
Expand Up @@ -19,14 +19,14 @@ public function testAddRemoveRole()
foreach (['', '.csv'] as $format) {
$crawler = $this->client->request('GET', '/shows/non-existent-test/signinsheet'.$format);
$this->assertEquals(404, $this->client->getResponse()->getStatusCode());
$this->assertContains('That show does not exist', $this->client->getResponse()->getContent());
$this->assertStringContainsString('That show does not exist', $this->client->getResponse()->getContent());
}

// Test no performances
foreach (['', '.csv'] as $format) {
$crawler = $this->client->request('GET', '/shows/'.$show->getSlug().'/signinsheet' . $format);
$this->assertEquals(404, $this->client->getResponse()->getStatusCode());
$this->assertContains('There are no performances associated with this show', $this->client->getResponse()->getContent());
$this->assertStringContainsString('There are no performances associated with this show', $this->client->getResponse()->getContent());
}

// Test with a performance, spanning a timezone change for the UK.
Expand Down
2 changes: 1 addition & 1 deletion tests/CamdramBundle/Entity/ApplicationRepositoryTest.php
Expand Up @@ -12,7 +12,7 @@ class ApplicationRepositoryTest extends RepositoryTestCase

private $show;

public function setUp()
public function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion tests/CamdramBundle/Entity/AuditionRepositoryTest.php
Expand Up @@ -12,7 +12,7 @@ class AuditionRepositoryTest extends RepositoryTestCase

private $show;

public function setUp()
public function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion tests/CamdramBundle/Entity/TechieAdvertRepositoryTest.php
Expand Up @@ -12,7 +12,7 @@ class TechieAdvertRepositoryTest extends RepositoryTestCase

private $show;

public function setUp()
public function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion tests/CamdramBundle/Form/Type/EntitySearchTypeTest.php
Expand Up @@ -20,7 +20,7 @@ class EntitySearchTypeTest extends TypeTestCase
*/
private $em;

public function setUp()
public function setUp(): void
{
$this->repo = $this->getMockBuilder('Acts\\CamdramBundle\\Entity\\SocietyRepository')
->disableOriginalConstructor()
Expand Down
2 changes: 1 addition & 1 deletion tests/CamdramBundle/Service/ContactEntityServiceTest.php
Expand Up @@ -29,7 +29,7 @@ class ContactEntityServiceTest extends TestCase
*/
private $contactEntityService;

public function setUp()
public function setUp(): void
{
$this->mailer = $this->getMockBuilder('\Swift_Mailer')
->disableOriginalConstructor()->disableOriginalClone()->getMock();
Expand Down
2 changes: 1 addition & 1 deletion tests/CamdramBundle/Service/EmailDispatcherTest.php
Expand Up @@ -28,7 +28,7 @@ class EmailDispatcherTest extends TestCase

private $from_address = 'from-address@camdram.net';

public function setUp()
public function setUp(): void
{
$this->mailer = $this->getMockBuilder('\Swift_Mailer')
->disableOriginalConstructor()->disableOriginalClone()->getMock();
Expand Down
2 changes: 1 addition & 1 deletion tests/CamdramBundle/Service/ModerationManagerTest.php
Expand Up @@ -60,7 +60,7 @@ class ModerationManagerTest extends TestCase
private $venue;
private $ownedShow;

public function setUp()
public function setUp(): void
{
$this->entityManager = $this->getMockBuilder('Doctrine\\ORM\\EntityManager')
->disableOriginalConstructor()->getMock();
Expand Down
2 changes: 1 addition & 1 deletion tests/CamdramBundle/Service/TextServiceTest.php
Expand Up @@ -12,7 +12,7 @@ class TextServiceTest extends TestCase
*/
private $textService;

public function setUp()
public function setUp(): void
{
$this->textService = new TextService();
}
Expand Down
Expand Up @@ -20,7 +20,7 @@ protected function createValidator()
return new MapDistanceValidator();
}

public function setUp()
public function setUp(): void
{
$this->mapDistanceConstraint = new MapDistance();
$this->mapDistanceConstraint->nearTo = array(52.1, 0.5);
Expand Down
Expand Up @@ -23,7 +23,7 @@ class DefaultControllerTest extends WebTestCase
*/
private $aclProvider;

public function setUp()
public function setUp(): void
{
$this->client = self::createClient(['environment' => 'test']);
$this->client->followRedirects(true);
Expand Down
12 changes: 5 additions & 7 deletions tests/CamdramSecurityBundle/Security/Acl/AclProviderTest.php
Expand Up @@ -9,11 +9,13 @@
use Acts\CamdramSecurityBundle\Entity\User;
use Acts\CamdramSecurityBundle\Entity\ExternalUser;
use Acts\CamdramSecurityBundle\Security\Acl\AclProvider;
use DMS\PHPUnitExtensions\ArraySubset\ArraySubsetAsserts;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Camdram\Tests\RepositoryTestCase;

class AclProviderTest extends RepositoryTestCase
{
use ArraySubsetAsserts;

/**
* @var \Acts\CamdramSecurityBundle\Security\Acl\AclProvider
Expand All @@ -36,7 +38,7 @@ class AclProviderTest extends RepositoryTestCase
private $user;
private $user2;

public function setUp()
public function setUp(): void
{
parent::setUp();
$this->aclProvider = new AclProvider($this->em, new EventDispatcher());
Expand Down Expand Up @@ -140,19 +142,15 @@ public function testGetOrganisationIdsByUser()
$this->assertSame($this->aclProvider->getOrganisationIdsByUser($this->user2), []);
}

/**
* @expectedException \ReflectionException
*/
public function testGetEntityIdsByUser_InvalidClass()
{
$this->expectException(\ReflectionException::class);
$this->aclProvider->getEntityIdsByUser($this->user, '\AnInvalidClassName');
}

/**
* @expectedException \InvalidArgumentException
*/
public function testGetEntityIdsByUser_NonOwnableClass()
{
$this->expectException(\InvalidArgumentException::class);
$this->aclProvider->getEntityIdsByUser($this->user, '\\Acts\\CamdramBundle\\Entity\\News');
}

Expand Down
Expand Up @@ -17,7 +17,7 @@ class AdminVoterTest extends TestCase
*/
private $voter;

public function setUp()
public function setUp(): void
{
$this->voter = new AdminVoter();
}
Expand Down
Expand Up @@ -18,7 +18,7 @@ class CreateVoterTest extends TestCase
*/
private $token;

public function setUp()
public function setUp(): void
{
$this->voter = new CreateVoter();
$this->token = new UsernamePasswordToken('testuser', 'password', 'public');
Expand Down
Expand Up @@ -17,7 +17,7 @@ class EditorVoterTest extends TestCase
*/
private $voter;

public function setUp()
public function setUp(): void
{
$this->voter = new EditorVoter();
}
Expand Down
Expand Up @@ -27,7 +27,7 @@ class OwnerVoterTest extends TestCase
*/
private $token;

public function setUp()
public function setUp(): void
{
$this->aclProvider = $this->getMockBuilder('\Acts\\CamdramSecurityBundle\\Security\\Acl\\AclProvider')
->disableOriginalConstructor()->getMock();
Expand Down
Expand Up @@ -25,7 +25,7 @@ class ProfileVoterTest extends TestCase
*/
private $user;

public function setUp()
public function setUp(): void
{
$this->voter = new ProfileVoter();
$this->token = new UsernamePasswordToken('testuser', 'password', 'public');
Expand Down