Skip to content
Permalink
Browse files

doctrine-test-bundle 5.0.3→6.0.0, PHPUnit 6.5→8.2.4

Bumps [dama/doctrine-test-bundle](https://github.com/dmaicher/doctrine-test-bundle) from 5.0.3 to 6.0.0.
- [Release notes](https://github.com/dmaicher/doctrine-test-bundle/releases)
- [Changelog](https://github.com/dmaicher/doctrine-test-bundle/blob/master/CHANGELOG.md)
- [Commits](dmaicher/doctrine-test-bundle@v5.0.3...v6.0.0)

composer.json now says it provides phpunit to avoid it being installed
as a requirement of dms/phpunit-arraysubset-asserts, which is a
replacement for an assert which was removed from PHPUnit.
  • Loading branch information...
GKFX committed Jul 12, 2019
1 parent 6791870 commit 85f4a6a6918b4a95c9e4d1641eebad3b1b0cfb68
Showing with 124 additions and 80 deletions.
  1. +1 −0 .gitignore
  2. +3 −1 composer.json
  3. +55 −14 composer.lock
  4. +1 −1 runtests
  5. +1 −1 tests/CamdramAdminBundle/Service/UserMergerTest.php
  6. +3 −3 tests/CamdramBundle/Controller/ContactUsControllerTest.php
  7. +1 −1 tests/CamdramBundle/Controller/DiaryControllerTest.php
  8. +2 −2 tests/CamdramBundle/Controller/SearchControllerTest.php
  9. +1 −1 tests/CamdramBundle/Controller/ShowControllerTest.php
  10. +2 −2 tests/CamdramBundle/Controller/SigninsheetControllerTest.php
  11. +1 −1 tests/CamdramBundle/Entity/ApplicationRepositoryTest.php
  12. +1 −1 tests/CamdramBundle/Entity/AuditionRepositoryTest.php
  13. +1 −1 tests/CamdramBundle/Entity/TechieAdvertRepositoryTest.php
  14. +1 −1 tests/CamdramBundle/Form/Type/EntitySearchTypeTest.php
  15. +1 −1 tests/CamdramBundle/Service/ContactEntityServiceTest.php
  16. +1 −1 tests/CamdramBundle/Service/EmailDispatcherTest.php
  17. +1 −1 tests/CamdramBundle/Service/ModerationManagerTest.php
  18. +1 −1 tests/CamdramBundle/Service/TextServiceTest.php
  19. +1 −1 tests/CamdramBundle/Validator/Constraints/MapDistanceValidatorTest.php
  20. +1 −1 tests/CamdramSecurityBundle/Controller/DefaultControllerTest.php
  21. +5 −7 tests/CamdramSecurityBundle/Security/Acl/AclProviderTest.php
  22. +1 −1 tests/CamdramSecurityBundle/Security/Acl/Voter/AdminVoterTest.php
  23. +1 −1 tests/CamdramSecurityBundle/Security/Acl/Voter/CreateVoterTest.php
  24. +1 −1 tests/CamdramSecurityBundle/Security/Acl/Voter/EditorVoterTest.php
  25. +1 −1 tests/CamdramSecurityBundle/Security/Acl/Voter/OwnerVoterTest.php
  26. +1 −1 tests/CamdramSecurityBundle/Security/Acl/Voter/ProfileVoterTest.php
  27. +1 −1 tests/CamdramSecurityBundle/Security/Acl/Voter/ShowVoterTest.php
  28. +1 −1 tests/CamdramSecurityBundle/Security/Acl/Voter/ViewVoterTest.php
  29. +1 −1 tests/DiaryBundle/Diary/DiaryRowTest.php
  30. +1 −1 tests/DiaryBundle/Diary/DiaryWeekTest.php
  31. +1 −1 tests/Functional/OAuthTest.php
  32. +4 −4 tests/Functional/SmokeTest.php
  33. +17 −17 tests/Functional/VacanciesTest.php
  34. +2 −2 tests/RepositoryTestCase.php
  35. +6 −4 tests/RestTestCase.php
@@ -11,6 +11,7 @@ composer.phar
.*.swp
bin
.web-server-pid
.phpunit.result.cache
node_modules
assets/js/fos_js_routes.json
coverage.xml
@@ -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",
@@ -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"

Some generated files are not rendered by default. Learn more.

@@ -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

@@ -15,7 +15,7 @@ class UserMergerTest extends RepositoryTestCase
private $person;
private $ace;
public function setUp()
public function setUp(): void
{
parent::setUp();
@@ -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());
}
}
}
@@ -13,7 +13,7 @@
class DiaryControllerTest extends RestTestCase
{
public function setUp()
public function setUp(): void
{
parent::setUp();
@@ -30,7 +30,7 @@ class SearchControllerTest extends WebTestCase
*/
private $user;
public function setUp()
public function setUp(): void
{
$this->client = self::createClient(array('environment' => 'test'));
@@ -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);
}
@@ -15,7 +15,7 @@ class ShowControllerTest extends RestTestCase
*/
private $show;
public function setUp()
public function setUp(): void
{
parent::setUp();
@@ -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.
@@ -12,7 +12,7 @@ class ApplicationRepositoryTest extends RepositoryTestCase
private $show;
public function setUp()
public function setUp(): void
{
parent::setUp();
@@ -12,7 +12,7 @@ class AuditionRepositoryTest extends RepositoryTestCase
private $show;
public function setUp()
public function setUp(): void
{
parent::setUp();
@@ -12,7 +12,7 @@ class TechieAdvertRepositoryTest extends RepositoryTestCase
private $show;
public function setUp()
public function setUp(): void
{
parent::setUp();
@@ -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()
@@ -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();
@@ -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();
@@ -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();
@@ -12,7 +12,7 @@ class TextServiceTest extends TestCase
*/
private $textService;
public function setUp()
public function setUp(): void
{
$this->textService = new TextService();
}
@@ -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);
@@ -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);
@@ -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
@@ -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());
@@ -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');
}
@@ -17,7 +17,7 @@ class AdminVoterTest extends TestCase
*/
private $voter;
public function setUp()
public function setUp(): void
{
$this->voter = new AdminVoter();
}
@@ -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');
@@ -17,7 +17,7 @@ class EditorVoterTest extends TestCase
*/
private $voter;
public function setUp()
public function setUp(): void
{
$this->voter = new EditorVoter();
}
@@ -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();
@@ -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');

0 comments on commit 85f4a6a

Please sign in to comment.
You can’t perform that action at this time.