Skip to content

Commit

Permalink
Fix specs
Browse files Browse the repository at this point in the history
  • Loading branch information
jmleroux committed Mar 14, 2016
1 parent a28f2a2 commit 60a309e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
4 changes: 1 addition & 3 deletions spec/PUGX/Poser/PoserSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ function it_should_be_able_to_generate_an_svg_image_from_URI()
public function getMatchers()
{
return array(
'beAValidSVGImageContaining' => function($object, $subject, $status)
{

'beAValidSVGImageContaining' => function($object, $subject, $status) {
$regex = '/^<svg.*width="((.|\n)*)'.$subject.'((.|\n)*)'.$status.'((.|\n)*)<\/svg>$/';
$matches = array();

Expand Down
4 changes: 1 addition & 3 deletions spec/PUGX/Poser/Render/SvgFlatRenderSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

namespace spec\PUGX\Poser\Render;

use PhpSpec\Exception\Exception;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use PUGX\Poser\Badge;
use PUGX\Poser\Calculator\GDTextSizeCalculator;
use PUGX\Poser\Calculator\TextSizeCalculatorInterface;

class SvgFlatRenderSpec extends ObjectBehavior
Expand Down Expand Up @@ -66,4 +64,4 @@ function it_should_render_a_license_mit_exactly_like_this_svg()
}


}
}
7 changes: 2 additions & 5 deletions spec/PUGX/Poser/Render/SvgFlatSquareRenderSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@

namespace spec\PUGX\Poser\Render;

use PhpSpec\Exception\Exception;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use PUGX\Poser\Badge;
use PUGX\Poser\Calculator\GDTextSizeCalculator;
use PUGX\Poser\Calculator\TextSizeCalculatorInterface;

class SvgFlatSquareRenderSpec extends ObjectBehavior
{
function let(TextSizeCalculatorInterface $calculator)
{
$calculator->calculateWidth(Argument::any())->willReturn(20);
$this->beConstructedWith($calculator);
$realCalculator = $calculator->getWrappedObject();
$this->beConstructedWith($realCalculator);
}

function it_should_render_a_svg()
Expand Down Expand Up @@ -64,6 +63,4 @@ function it_should_render_a_license_mit_exactly_like_this_svg()
$badge = Badge::fromURI('license-MIT-blue.svg');
$this->render($badge)->__toString()->shouldBeLike($template);
}


}
3 changes: 1 addition & 2 deletions spec/PUGX/Poser/Render/SvgRenderSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace spec\PUGX\Poser\Render;

use PhpSpec\Exception\Exception;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use PUGX\Poser\Badge;
Expand Down Expand Up @@ -34,4 +33,4 @@ public function getMatchers()
}
);
}
}
}

0 comments on commit 60a309e

Please sign in to comment.