GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

ServiceTest::testSend()   A
last analyzed

Complexity

Conditions 2
Paths 3

Size

Total Lines 22
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 22
rs 9.2
c 0
b 0
f 0
cc 2
eloc 14
nc 3
nop 0
1
<?php
2
3
namespace Hautzi\SystemMailBundle\Tests;
4
5
use Symfony\Bundle\FrameworkBundle\Console\Application;
6
use Symfony\Component\Console\Input\ArrayInput;
7
use Symfony\Component\Console\Output\NullOutput;
8
use Symfony\Component\HttpFoundation\Request;
9
use Symfony\Component\HttpFoundation\RequestStack;
10
11
class ServiceTest extends \PHPUnit_Framework_TestCase
12
{
13
    /**
14
     * This tests only purpose is to check if the service container configuration works properly
15
     */
16
    public function testSend()
17
    {
18
        $kernel = new \AppKernel('test', true);
19
        $kernel->boot();
20
21
        $container = $kernel->getContainer();
22
23
        $request = $this->prophesize(Request::class);
24
        $request->getLocale()->willReturn('de');
25
26
        $requestStack = $this->prophesize(RequestStack::class);
27
        $requestStack->getMasterRequest()->willReturn($request->reveal());
28
        $container->set('request_stack', $requestStack->reveal());
29
30
        try {
31
            $container->get('system_mailer')->send('HautziSystemMail:test');
32
            $this->fail('fetching a mail that does nox exist should throw an exception.');
33
        }
34
        catch (\InvalidArgumentException $e) {
35
            $this->assertContains('@HautziSystemMailBundle/Resources/emails/test.xml.twig', $e->getMessage());
36
        }
37
    }
38
}