Skip to content

Commit

Permalink
Bugfix: tests were failing.
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniocambados committed Oct 21, 2018
1 parent 90318c3 commit 7ce97d6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
6 changes: 3 additions & 3 deletions tests/Builder/WebBuilderDumpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ public function testNominalCase()

$html = $this->root->getChild('build/index.html')->getContent();

$this->assertRegExp('/<title>dummy root package Composer repository<\/title>/', $html);
$this->assertRegExp('{<h3 id="[^"]+" class="panel-title package-title">\s*<a href="#vendor/name" class="anchor">\s*<svg[^>]*>.+</svg>\s*vendor/name\s*</a>\s*</h3>}si', $html);
$this->assertRegExp('/<title>dummy root package<\/title>/', $html);
$this->assertRegExp('{<div id="[^"]+" class="card-header[^"]+">\s*<a href="#vendor/name" class="[^"]+">\s*<svg[^>]*>.+</svg>\s*vendor/name\s*</a>\s*</div>}si', $html);
$this->assertFalse((bool) preg_match('/<p class="abandoned">/', $html));
}

Expand All @@ -77,7 +77,7 @@ public function testRepositoryWithNoName()

$html = $this->root->getChild('build/index.html')->getContent();

$this->assertRegExp('/<title>A Composer repository<\/title>/', $html);
$this->assertRegExp('/<title>A<\/title>/', $html);
}

public function testDependencies()
Expand Down
16 changes: 7 additions & 9 deletions views/package.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
{% set col2_class = 'col-sm-9 col-md-10' %}

<div class="card {% if package.abandoned %}border-danger{% else %}border-primary{% endif %} mb-3">
<div class="card-header {% if package.abandoned %}bg-danger{% else %}bg-primary{% endif %}">
<span id="{{ package.highest.name }}" class="">
<a href="#{{ package.highest.name }}" class="anchor text-white">
<svg class="octicon-link" width="16" height="16">
<use xlink:href="#octicon-link"></use>
</svg>
{{ package.highest.name }}
</a>
</span>
<div id="{{ package.highest.name }}" class="card-header {% if package.abandoned %}bg-danger{% else %}bg-primary{% endif %}">
<a href="#{{ package.highest.name }}" class="text-white">
<svg class="octicon-link" width="16" height="16">
<use xlink:href="#octicon-link"></use>
</svg>
{{ package.highest.name }}
</a>

{% if package.abandoned %}
<p class="abandoned">
Expand Down

0 comments on commit 7ce97d6

Please sign in to comment.