This repository was archived by the owner on Apr 12, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +30
-37
lines changed Expand file tree Collapse file tree 3 files changed +30
-37
lines changed Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ GitonomyGitBundle
3
3
4
4
This bundle provides git features for your twig-based application.
5
5
6
- Please read `the documentation <Resources/doc/index.rst> `.
6
+ Please read `the documentation <Resources/doc/index.rst >`_ .
Original file line number Diff line number Diff line change 225
225
226
226
{# References #}
227
227
228
- {% block branches %}
229
- {% spaceless %}
230
- <ul >
231
- {% for branch in branches %}
232
- <li >
233
- <a href =" {{ git_url(branch ) }}" >
234
- <strong >{{ branch .name }}</strong >
235
- </a >
236
- <small >
237
- {{ git_author(branch .commit ) }}
238
- {{ branch .commit .authorDate .format (' d/m/Y' ) }}
239
- </small >
240
- </li >
241
- {% endfor %}
242
- </ul >
243
- {% endspaceless %}
244
- {% endblock %}
245
-
246
- {% block tags %}
247
- {% spaceless %}
248
- <ul >
249
- {% for tag in tags %}
250
- <li >
251
- <a href =" {{ git_url(tag ) }}" >
252
- <strong >{{ tag .name }}</strong >
253
- </a >
254
- <small >
255
- {{ git_author(tag .commit ) }}
256
- {{ tag .commit .authorDate .format (' d/m/Y' ) }}
257
- </small >
258
- </li >
259
- {% endfor %}
260
- </ul >
261
- {% endspaceless %}
262
- {% endblock %}
263
-
264
228
{% block git_label_revision %}
265
229
{% spaceless %}
266
230
{% if revision is git_reference %}
Original file line number Diff line number Diff line change 13
13
class RenderingTest extends AbstractTest
14
14
{
15
15
private static $ templates = array (
16
+ 'diff ' => '{{ git_diff(diff) }} ' ,
17
+ 'log ' => '{{ git_log(log) }} ' ,
16
18
'label_tag ' => '{{ git_label(tag) }} ' ,
17
19
'label_branch ' => '{{ git_label(branch) }} ' ,
18
20
);
19
21
22
+ public function testRenderingOk ()
23
+ {
24
+ $ repository = self ::getFoobarRepository ();
25
+
26
+ $ commits = array (
27
+ self ::LONGFILE_COMMIT ,
28
+ self ::BEFORE_LONGFILE_COMMIT ,
29
+ self ::LONGMESSAGE_COMMIT ,
30
+ self ::INITIAL_COMMIT ,
31
+ self ::MERGE_COMMIT ,
32
+ self ::ENCODING_COMMIT ,
33
+ );
34
+
35
+ foreach ($ commits as $ hash ) {
36
+ $ commit = $ repository ->getCommit ($ hash );
37
+ $ diff = $ commit ->getDiff ();
38
+ $ log = $ repository ->getLog ($ hash .'.. ' .self ::INITIAL_COMMIT );
39
+
40
+ $ crawler = self ::render ('diff ' , array ('diff ' => $ diff ));
41
+ $ this ->assertCount (1 , $ crawler ->filter ('div.file-wrapper ' ));
42
+
43
+ $ crawler = self ::render ('log ' , array ('log ' => $ log ));
44
+ $ this ->assertCount (1 , $ crawler ->filter ('table ' ));
45
+
46
+ }
47
+ }
48
+
20
49
public function testLabel_Tag ()
21
50
{
22
51
$ repository = self ::getFoobarRepository ();
You can’t perform that action at this time.
0 commit comments