Skip to content

Commit fcc959b

Browse files
committed
🎨 fix client reference, mime dep, tests
1 parent 34a9c5d commit fcc959b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"phpunit/phpunit": "^8.5 || ^9.1",
3232
"symfony/doctrine-bridge": "^4.4 || ^5.0",
3333
"symfony/framework-bundle": "^4.4 || ^5.0",
34+
"symfony/mime": "^4.4 || ^5.0",
3435
"symfony/security-core": "^4.4 || ^5.0",
3536
"symfony/swiftmailer-bundle": "^3.4"
3637
},

src/Test/WebTestCase.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use Doctrine\Common\DataFixtures\Purger\ORMPurger;
77
use Doctrine\ORM\EntityManagerInterface;
88
use Symfony\Bridge\Doctrine\DataFixtures\ContainerAwareLoader as Loader;
9-
use Symfony\Bundle\FrameworkBundle\Client;
109
use Symfony\Bundle\FrameworkBundle\Console\Application;
1110
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as SymfonyWebTestCase;
1211
use Symfony\Component\BrowserKit\Cookie;
@@ -26,7 +25,7 @@ abstract class WebTestCase extends SymfonyWebTestCase
2625
protected $em;
2726

2827
/**
29-
* @var Client
28+
* @var \Symfony\Component\BrowserKit\AbstractBrowser
3029
*/
3130
protected static $client;
3231

tests/Test/WebTestCaseTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use org\bovigo\vfs\vfsStream;
88
use PHPUnit\Framework\TestCase;
99
use Symfony\Bridge\Doctrine\DataFixtures\ContainerAwareLoader;
10-
use Symfony\Bundle\FrameworkBundle\Client;
10+
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
1111
use Symfony\Bundle\SwiftmailerBundle\DataCollector\MessageDataCollector;
1212
use Symfony\Component\BrowserKit\CookieJar;
1313
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -36,7 +36,7 @@ final class WebTestCaseTest extends TestCase
3636
protected function setUp(): void
3737
{
3838
$this->container = $this->createMock(ContainerInterface::class);
39-
$this->client = $this->getMockBuilder(Client::class)->disableOriginalConstructor()->getMock();
39+
$this->client = $this->getMockBuilder(KernelBrowser::class)->disableOriginalConstructor()->getMock();
4040
$this->mock = $this->createMock(WebTestCase::class);
4141

4242
$class = new \ReflectionClass($this->mock);
@@ -125,7 +125,7 @@ public function testLogin(): void
125125
// Call `login` method
126126
$method = new \ReflectionMethod($this->mock, 'login');
127127
$method->setAccessible(true);
128-
$method->invoke($this->mock);
128+
$method->invoke($this->mock, '[email protected]', 'main', 'beelab_user.manager');
129129
}
130130

131131
public function testGetFile(): void

0 commit comments

Comments
 (0)