Skip to content

Commit bbf1e5d

Browse files
committed
fix for fixture data issue
1 parent 48c4ed0 commit bbf1e5d

File tree

2 files changed

+67
-2
lines changed

2 files changed

+67
-2
lines changed

test/Kirschbaum/DrupalBehatRemoteAPIClient/Tests/NodeTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,12 @@ public function should_take_exception_when_incorrect_credentials_are_provided()
9696
*/
9797
public function should_take_exception_when_too_many_terms_are_provided()
9898
{
99-
$this->markTestSkipped('Having trouble with Mock Data');
99+
// Having trouble with URL encoding match: https://github.com/php-vcr/php-vcr/issues/66
100+
VCR::configure()
101+
->addRequestMatcher('url', function ($first, $second)
102+
{
103+
return $second->getPath() == $first->getPath();
104+
});
100105
VCR::turnOn();
101106
VCR::insertCassette('should_take_exception_when_too_many_terms_are_provided.json');
102107
$client = new Client();
Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,61 @@
1-
[]
1+
[{
2+
"request": {
3+
"method": "GET",
4+
"url": "http:\/\/drupalsite.loc:8000\/drupal-remote-api\/entities\/type,title,body,field_tags",
5+
"headers": {
6+
"Host": "drupalsite.loc:8000",
7+
"Accept": "application\/json",
8+
"Content-Type": "application\/json",
9+
"User-Agent": "drupal-behat-remote-api-driver (https:\/\/github.com\/kirschbaum\/drupal-behat-remote-api-driver)",
10+
"Drupal-Auth": "dXNlcm5hbWU6cGFzc3dvcmQ=",
11+
"Content-Length": "0"
12+
}
13+
},
14+
"response": {
15+
"status": 200,
16+
"headers": {
17+
"Server": "nginx\/1.6.2",
18+
"Date": "Thu, 05 Mar 2015 22:46:06 GMT",
19+
"Content-Type": "application\/json",
20+
"Transfer-Encoding": "chunked",
21+
"Connection": "keep-alive",
22+
"Expires": "Sun, 19 Nov 1978 05:00:00 GMT",
23+
"Last-Modified": "Thu, 05 Mar 2015 22:46:06 GMT",
24+
"Cache-Control": "no-cache, must-revalidate, post-check=0, pre-check=0",
25+
"ETag": "\"1425595566\"",
26+
"Set-Cookie": "SESS488d94cf44c7293d2d0740a8c4e190bc=wbP7bjSXkiA4mmQrF2tPIVM22hxc2s_on3uYdPjAzbc; expires=Sun, 29-Mar-2015 02:19:26 GMT; Max-Age=2000000; path=\/; domain=.drupalsite.loc; HttpOnly",
27+
"Content-Language": "en"
28+
},
29+
"body": "{\"data\":{\"filter_formats\":{\"filtered_html\":{\"format\":\"filtered_html\",\"name\":\"Filtered HTML\",\"cache\":\"1\",\"status\":\"1\",\"weight\":\"0\"},\"plain_text\":{\"format\":\"plain_text\",\"name\":\"Plain text\",\"cache\":\"1\",\"status\":\"1\",\"weight\":\"10\"}},\"node_type_get_types\":{\"article\":{\"type\":\"article\",\"name\":\"Article\",\"base\":\"node_content\",\"module\":\"node\",\"description\":\"Use \\u003Cem\\u003Earticles\\u003C\\\/em\\u003E for time-sensitive content like news, press releases or blog posts.\",\"help\":\"\",\"has_title\":\"1\",\"title_label\":\"Title\",\"custom\":\"1\",\"modified\":\"1\",\"locked\":\"0\",\"disabled\":\"0\",\"orig_type\":\"article\",\"disabled_changed\":false},\"page\":{\"type\":\"page\",\"name\":\"Basic page\",\"base\":\"node_content\",\"module\":\"node\",\"description\":\"Use \\u003Cem\\u003Ebasic pages\\u003C\\\/em\\u003E for your static content, such as an \\u0027About us\\u0027 page.\",\"help\":\"\",\"has_title\":\"1\",\"title_label\":\"Title\",\"custom\":\"1\",\"modified\":\"1\",\"locked\":\"0\",\"disabled\":\"0\",\"orig_type\":\"page\",\"disabled_changed\":false}},\"field_info_field\":{\"type\":null,\"title\":null,\"body\":{\"entity_types\":[\"node\"],\"translatable\":\"0\",\"settings\":[],\"storage\":{\"type\":\"field_sql_storage\",\"settings\":[],\"module\":\"field_sql_storage\",\"active\":\"1\",\"details\":{\"sql\":{\"FIELD_LOAD_CURRENT\":{\"field_data_body\":{\"value\":\"body_value\",\"summary\":\"body_summary\",\"format\":\"body_format\"}},\"FIELD_LOAD_REVISION\":{\"field_revision_body\":{\"value\":\"body_value\",\"summary\":\"body_summary\",\"format\":\"body_format\"}}}}},\"foreign keys\":{\"format\":{\"table\":\"filter_format\",\"columns\":{\"format\":\"format\"}}},\"indexes\":{\"format\":[\"format\"]},\"id\":\"2\",\"field_name\":\"body\",\"type\":\"text_with_summary\",\"module\":\"text\",\"active\":\"1\",\"locked\":\"0\",\"cardinality\":\"1\",\"deleted\":\"0\",\"columns\":{\"value\":{\"type\":\"text\",\"size\":\"big\",\"not null\":false},\"summary\":{\"type\":\"text\",\"size\":\"big\",\"not null\":false},\"format\":{\"type\":\"varchar\",\"length\":255,\"not null\":false}},\"bundles\":{\"node\":[\"page\",\"article\"]}},\"field_tags\":{\"settings\":{\"allowed_values\":[{\"vocabulary\":\"tags\",\"parent\":0}]},\"entity_types\":[],\"translatable\":\"0\",\"storage\":{\"type\":\"field_sql_storage\",\"settings\":[],\"module\":\"field_sql_storage\",\"active\":\"1\",\"details\":{\"sql\":{\"FIELD_LOAD_CURRENT\":{\"field_data_field_tags\":{\"tid\":\"field_tags_tid\"}},\"FIELD_LOAD_REVISION\":{\"field_revision_field_tags\":{\"tid\":\"field_tags_tid\"}}}}},\"foreign keys\":{\"tid\":{\"table\":\"taxonomy_term_data\",\"columns\":{\"tid\":\"tid\"}}},\"indexes\":{\"tid\":[\"tid\"]},\"id\":\"3\",\"field_name\":\"field_tags\",\"type\":\"taxonomy_term_reference\",\"module\":\"taxonomy\",\"active\":\"1\",\"locked\":\"0\",\"cardinality\":\"1\",\"deleted\":\"0\",\"columns\":{\"tid\":{\"type\":\"int\",\"unsigned\":true,\"not null\":false}},\"bundles\":{\"node\":[\"article\"]}}}},\"message\":\"Entity metadata retrieved successfully\",\"response_code\":200}"
30+
}
31+
},{
32+
"request": {
33+
"method": "GET",
34+
"url": "http:\/\/drupalsite.loc:8000\/drupal-remote-api\/terms\/Tag%20one,%20Tag%20two",
35+
"headers": {
36+
"Host": "drupalsite.loc:8000",
37+
"Accept": "application\/json",
38+
"Content-Type": "application\/json",
39+
"User-Agent": "drupal-behat-remote-api-driver (https:\/\/github.com\/kirschbaum\/drupal-behat-remote-api-driver)",
40+
"Drupal-Auth": "dXNlcm5hbWU6cGFzc3dvcmQ=",
41+
"Content-Length": "0"
42+
}
43+
},
44+
"response": {
45+
"status": 200,
46+
"headers": {
47+
"Server": "nginx\/1.6.2",
48+
"Date": "Thu, 05 Mar 2015 22:51:31 GMT",
49+
"Content-Type": "application\/json",
50+
"Transfer-Encoding": "chunked",
51+
"Connection": "keep-alive",
52+
"Expires": "Sun, 19 Nov 1978 05:00:00 GMT",
53+
"Last-Modified": "Thu, 05 Mar 2015 22:51:31 GMT",
54+
"Cache-Control": "no-cache, must-revalidate, post-check=0, pre-check=0",
55+
"ETag": "\"1425595891\"",
56+
"Set-Cookie": "SESS488d94cf44c7293d2d0740a8c4e190bc=qcC9D8eI1gKbJiChqo3T5fWkbdGGxEMd--U2osOCG5A; expires=Sun, 29-Mar-2015 02:24:51 GMT; Max-Age=2000000; path=\/; domain=.drupalsite.loc; HttpOnly",
57+
"Content-Language": "en"
58+
},
59+
"body": "{\"data\":[{\"tid\":\"61\",\"vid\":\"1\",\"name\":\"Tag one\",\"description\":null,\"format\":null,\"weight\":\"0\",\"vocabulary_machine_name\":\"tags\",\"rdf_mapping\":{\"rdftype\":[\"skos:Concept\"],\"name\":{\"predicates\":[\"rdfs:label\",\"skos:prefLabel\"]},\"description\":{\"predicates\":[\"skos:definition\"]},\"vid\":{\"predicates\":[\"skos:inScheme\"],\"type\":\"rel\"},\"parent\":{\"predicates\":[\"skos:broader\"],\"type\":\"rel\"}}},{\"tid\":\"62\",\"vid\":\"1\",\"name\":\"Tag two\",\"description\":null,\"format\":null,\"weight\":\"0\",\"vocabulary_machine_name\":\"tags\",\"rdf_mapping\":{\"rdftype\":[\"skos:Concept\"],\"name\":{\"predicates\":[\"rdfs:label\",\"skos:prefLabel\"]},\"description\":{\"predicates\":[\"skos:definition\"]},\"vid\":{\"predicates\":[\"skos:inScheme\"],\"type\":\"rel\"},\"parent\":{\"predicates\":[\"skos:broader\"],\"type\":\"rel\"}}}],\"message\":\"Term metadata retrieved successfully\",\"response_code\":200}"
60+
}
61+
}]

0 commit comments

Comments
 (0)