author | ymh <ymh.work@gmail.com> |
Wed, 20 Jan 2016 16:42:20 +0100 | |
changeset 112 | 7a542145832c |
parent 111 | af85c436048f |
child 113 | faff38055a07 |
permissions | -rw-r--r-- |
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
1 |
<?php |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
2 |
|
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
3 |
use CorpusParole\Repositories\DocumentRepository; |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
4 |
use Mockery as m; |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
5 |
use Illuminate\Pagination\LengthAwarePaginator; |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
6 |
use CorpusParole\Models\Document; |
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
7 |
|
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
8 |
/** |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
9 |
* |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
10 |
*/ |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
11 |
class DocumentListControllerTest extends TestCase { |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
12 |
|
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
13 |
const GET_DOC = <<<EOT |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
14 |
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
15 |
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
16 |
@prefix sesame: <http://www.openrdf.org/schema/sesame#> . |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
17 |
@prefix owl: <http://www.w3.org/2002/07/owl#> . |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
18 |
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
19 |
@prefix fn: <http://www.w3.org/2005/xpath-functions#> . |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
20 |
|
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
21 |
_:genid-25e7608caea646d5ba7b21eaf92c050f-genid1 a <http://www.europeana.eu/schemas/edm/Place> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
22 |
owl:sameAs <http://sws.geonames.org/3469058/> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
23 |
<http://www.w3.org/2004/02/skos/core#note> "BR"^^<http://purl.org/dc/terms/ISO3166> , "Brésil, Brasilia"@fr ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
24 |
<http://www.w3.org/2003/01/geo/wgs84_pos#lat> "-15.77972"^^xsd:float ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
25 |
<http://www.w3.org/2003/01/geo/wgs84_pos#long> "-47.92972"^^xsd:float . |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
26 |
|
112 | 27 |
<http://corpusdelaparole.huma-num.fr/corpus/res/crdo-BOD092_SOUND> a <http://www.openarchives.org/ore/terms/Aggregation> ; |
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
28 |
<http://www.europeana.eu/schemas/edm/aggregatedCHO> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-BOD092_SOUND> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
29 |
<http://www.europeana.eu/schemas/edm/dataProvider> "Corpus de la Parole"@fr ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
30 |
<http://www.europeana.eu/schemas/edm/hasView> <http://cocoon.huma-num.fr/data/boutet/BOD092_low.mp4> , <http://cocoon.huma-num.fr/data/boutet/BOD092_low.ogg> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
31 |
<http://www.europeana.eu/schemas/edm/isShownAt> <http://cocoon.huma-num.fr/exist/crdo/meta/crdo-BOD092_SOUND> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
32 |
<http://www.europeana.eu/schemas/edm/isShownBy> <http://cocoon.huma-num.fr/data/archi/masters/350801.mp4> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
33 |
<http://www.europeana.eu/schemas/edm/provider> "Corpus de la Parole"@fr ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
34 |
<http://www.europeana.eu/schemas/edm/rights> <http://creativecommons.org/licenses/by-nc-nd/4.0/> . |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
35 |
|
111
af85c436048f
change edm:WebResources to edm:WebResources
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
36 |
<http://cocoon.huma-num.fr/data/archi/masters/350801.mp4> a <http://www.europeana.eu/schemas/edm/WebResource> ; |
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
37 |
<http://purl.org/dc/elements/1.1/format> "video/mp4"^^<http://purl.org/dc/terms/IMT> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
38 |
<http://purl.org/dc/terms/created> "2001-03"^^<http://purl.org/dc/terms/W3CDTF> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
39 |
<http://purl.org/dc/terms/extent> "PT00H01M54S" ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
40 |
<http://purl.org/dc/terms/issued> "2013-06-04T22:39:21+02:00"^^<http://purl.org/dc/terms/W3CDTF> . |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
41 |
|
111
af85c436048f
change edm:WebResources to edm:WebResources
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
42 |
<http://cocoon.huma-num.fr/data/boutet/BOD092_low.mp4> a <http://www.europeana.eu/schemas/edm/WebResource> ; |
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
43 |
<http://purl.org/dc/elements/1.1/format> "video/mp4"^^<http://purl.org/dc/terms/IMT> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
44 |
<http://purl.org/dc/terms/created> "2001-03"^^<http://purl.org/dc/terms/W3CDTF> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
45 |
<http://purl.org/dc/terms/extent> "PT00H01M54S" ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
46 |
<http://purl.org/dc/terms/issued> "2013-06-04T22:39:21+02:00"^^<http://purl.org/dc/terms/W3CDTF> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
47 |
<http://www.europeana.eu/schemas/edm/isDerivativeOf> <http://cocoon.huma-num.fr/data/archi/masters/350801.mp4> . |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
48 |
|
111
af85c436048f
change edm:WebResources to edm:WebResources
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
49 |
<http://cocoon.huma-num.fr/data/boutet/BOD092_low.ogg> a <http://www.europeana.eu/schemas/edm/WebResource> ; |
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
50 |
<http://purl.org/dc/elements/1.1/format> "video/ogg"^^<http://purl.org/dc/terms/IMT> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
51 |
<http://purl.org/dc/terms/created> "2001-03"^^<http://purl.org/dc/terms/W3CDTF> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
52 |
<http://purl.org/dc/terms/extent> "PT00H01M54S" ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
53 |
<http://purl.org/dc/terms/issued> "2013-06-04T22:39:21+02:00"^^<http://purl.org/dc/terms/W3CDTF> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
54 |
<http://www.europeana.eu/schemas/edm/isDerivativeOf> <http://cocoon.huma-num.fr/data/archi/masters/350801.mp4> . |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
55 |
|
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
56 |
<http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-BOD092_SOUND> a <http://www.europeana.eu/schemas/edm/ProvidedCHO> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
57 |
<http://purl.org/dc/terms/created> "2001-03"^^<http://purl.org/dc/terms/W3CDTF> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
58 |
<http://purl.org/dc/terms/extent> "PT00H01M54S" ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
59 |
<http://purl.org/dc/terms/issued> "2013-06-04T22:39:21+02:00"^^<http://purl.org/dc/terms/W3CDTF> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
60 |
<http://purl.org/dc/elements/1.1/contributor> <http://viaf.org/viaf/202009521> , <http://viaf.org/viaf/74053259> , "Fiore, Sonia" , <http://viaf.org/viaf/207122465> , "Lacroix, Magdalena" , "Ivaldo" , "Lucia" ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
61 |
<http://purl.org/dc/elements/1.1/description> """Cette séquence fait partie du corpus vidéo de Langue des |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
62 |
Signes Emergentes utilisé lors de la thèse d'Ivani Fusellier-Souza : le locuteur Ivaldo |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
63 |
raconte que son oncle Geraldo est riche mais n'est pas radin, et qu'il y a très |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
64 |
longtemps lorsque les affaires marchaient pour son"""@fr ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
65 |
<http://purl.org/dc/elements/1.1/language> <http://lexvo.org/id/iso639-3/und> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
66 |
<http://purl.org/dc/elements/1.1/rights> "Copyright (c) Cuxac, Christian" ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
67 |
<http://purl.org/dc/elements/1.1/subject> <http://ark.bnf.fr/ark:/12148/cb11946662b> , <http://ark.bnf.fr/ark:/12148/cb119339867> , <http://ark.bnf.fr/ark:/12148/cb11963612g> , "general_linguistics"^^<http://www.language-archives.org/OLAC/1.1/linguistic-field> , <http://ark.bnf.fr/ark:/12148/cb11965628b> , <http://lexvo.org/id/iso639-3/und> , <http://ark.bnf.fr/ark:/12148/cb119677899> , <http://ark.bnf.fr/ark:/12148/cb119511608> , <http://ark.bnf.fr/ark:/12148/cb16648129s> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
68 |
<http://purl.org/dc/elements/1.1/title> "Corpus LS émergente, L'oncle Geraldo, raconté par Ivaldo"@fr ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
69 |
<http://purl.org/dc/elements/1.1/type> "dialogue"^^<http://www.language-archives.org/OLAC/1.1/discourse-type> , "primary_text"^^<http://www.language-archives.org/OLAC/1.1/linguistic-type> , <http://purl.org/dc/dcmitype/MovingImage> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
70 |
<http://purl.org/dc/terms/accessRights> "Freely available for non-commercial use" ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
71 |
<http://purl.org/dc/terms/available> "2013-06-04"^^<http://purl.org/dc/terms/W3CDTF> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
72 |
<http://purl.org/dc/terms/isPartOf> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
73 |
<http://purl.org/dc/terms/license> <http://creativecommons.org/licenses/by-nc-nd/2.5/> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
74 |
<http://purl.org/dc/terms/spatial> _:genid-25e7608caea646d5ba7b21eaf92c050f-genid1 ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
75 |
<http://www.language-archives.org/OLAC/1.1/depositor> <http://viaf.org/viaf/202009521> , <http://viaf.org/viaf/74053259> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
76 |
<http://www.language-archives.org/OLAC/1.1/interviewer> <http://viaf.org/viaf/207122465> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
77 |
<http://www.language-archives.org/OLAC/1.1/speaker> "Ivaldo" , "Lucia" ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
78 |
<http://purl.org/dc/terms/tableOfContents> "00:00:00>00:00:45 Ivaldo raconte que son oncle Geraldo est riche. C'est un homme cultivé, qui a beaucoup d'argent. Il habite près de l'aéroport, où habite également l'amie de Lucia. La femme à Geraldo aussi est riche. 00:00:45>00:00:46 Lucia dit qu'il est riche, tant mieux pour lui. 00:00:46>00:01:55 Ivaldo raconte que son oncle était riche mais généreux. Il lui donne des billets d'avion pour voyager. Il lui donne également des vêtements. Ensuite, Ivaldo raconte qu'avant, son père était aisé et c'est l'oncle Geraldo qui ne l'était pas. Alors son père aidait l'oncle Geraldo car les affaires allaient bien. Mais par la suite, les affaires ont chutées et pour l'oncle Geraldo elles montaient."@fr ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
79 |
<http://www.language-archives.org/OLAC/1.1/compiler> <http://viaf.org/viaf/202009521> , <http://viaf.org/viaf/74053259> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
80 |
<http://www.language-archives.org/OLAC/1.1/data_inputter> <http://viaf.org/viaf/202009521> , "Fiore, Sonia" , "Lacroix, Magdalena" ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
81 |
<http://purl.org/dc/terms/alternative> "Séquence 13, L'oncle Geraldo, raconté par Ivaldo"@fr ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
82 |
<http://www.language-archives.org/OLAC/1.1/author> <http://viaf.org/viaf/207122465> ; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
83 |
<http://www.language-archives.org/OLAC/1.1/translator> <http://viaf.org/viaf/207122465> . |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
84 |
EOT; |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
85 |
|
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
86 |
#""" comment for syntax highliting |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
87 |
|
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
88 |
private $documentRepository; |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
89 |
|
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
90 |
public function setUp() { |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
91 |
|
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
92 |
parent::setup(); |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
93 |
|
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
94 |
// create a mock of the post repository interface and inject it into the |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
95 |
// IoC container |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
96 |
$this->documentRepository = m::mock('CorpusParole\Repositories\DocumentRepository'); |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
97 |
$this->app->instance('CorpusParole\Repositories\DocumentRepository', $this->documentRepository); |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
98 |
} |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
99 |
|
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
100 |
public function tearDown() { |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
101 |
m::close(); |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
102 |
parent::tearDown(); |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
103 |
} |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
104 |
|
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
105 |
public function testIndex() { |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
106 |
$this->documentRepository |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
107 |
->shouldReceive('paginateAll') |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
108 |
->once() |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
109 |
->andReturn( |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
110 |
new LengthAwarePaginator([], 0, 10, 1, [ |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
111 |
'path' => '', |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
112 |
'pageName' => 'page', |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
113 |
])); |
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
114 |
|
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
115 |
$response = $this->call('GET', '/bo/docs'); |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
116 |
|
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
117 |
$this->assertResponseOk($response); |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
118 |
$this->assertViewHas('docs'); |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
119 |
} |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
120 |
|
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
121 |
public function testShow() { |
112 | 122 |
$res_doc = new EasyRdf\Graph('http://corpusdelaparole.huma-num.fr/corpus/res/crdo-BOD092_SOUND',DocumentListControllerTest::GET_DOC); |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
123 |
$this->documentRepository |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
124 |
->shouldReceive('get') |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
125 |
->once() |
112 | 126 |
->andReturn(new Document('http://corpusdelaparole.huma-num.fr/corpus/res/crdo-BOD092_SOUND', $res_doc)); |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
127 |
|
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
128 |
$response = $this->visit('/bo/docs/crdo-BOD092_SOUND'); |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
129 |
|
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
130 |
} |
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
131 |
} |