mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Fix build
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<input class="required_field" type='text' name='{{name}}' value="{{ caption.get_dc_field('Title') is not none ? caption.get_dc_field('Title').get_value()|default(record.get_title()) : record.get_title() }}"/>
|
||||
<input class="required_field" type='text' name='{{name}}' value="{{ caption.get_dc_field('Title') is not none ? caption.get_dc_field('Title').get_serialized_values()|default(record.get_title()) : record.get_title() }}"/>
|
||||
<br />
|
||||
{{ error_form.display_errors(name, constraint_errors) }}
|
||||
</td>
|
||||
@@ -48,7 +48,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<td class='column_right'>
|
||||
<textarea class="required_field" name="{{name}}" rows="5">{{ caption.get_dc_field('Description') is not none ? caption.get_dc_field('Description').get_value() : "" }}</textarea>
|
||||
<textarea class="required_field" name="{{name}}" rows="5">{{ caption.get_dc_field('Description') is not none ? caption.get_dc_field('Description').get_serialized_values() : "" }}</textarea>
|
||||
<br />
|
||||
{{ error_form.display_errors(name, constraint_errors) }}
|
||||
</td>
|
||||
|
@@ -45,7 +45,7 @@
|
||||
<label for='{{name}}'>{% trans 'Titre' %}</label>
|
||||
</td>
|
||||
<td style="width:180px;">
|
||||
<input class="required_field" style="width:150px;" type='text' name='{{name}}' value="{{ caption.get_dc_field('Title') is not none ? caption.get_dc_field('Title').get_value()|default(record.get_title()) : record.get_title() }}"/>
|
||||
<input class="required_field" style="width:150px;" type='text' name='{{name}}' value="{{ caption.get_dc_field('Title') is not none ? caption.get_dc_field('Title').get_serialized_values()|default(record.get_title()) : record.get_title() }}"/>
|
||||
<br />
|
||||
{{ error_form.display_errors(name, constraint_errors) }}
|
||||
</td>
|
||||
@@ -61,7 +61,7 @@
|
||||
</label>
|
||||
</td>
|
||||
<td class='column_right'>
|
||||
<textarea class="required_field" name="{{ name }}" rows="5" style="width:150px;">{{ caption.get_dc_field('Description') is not none ? caption.get_dc_field('Description').get_value() : "" }}</textarea>
|
||||
<textarea class="required_field" name="{{ name }}" rows="5" style="width:150px;">{{ caption.get_dc_field('Description') is not none ? caption.get_dc_field('Description').get_serialized_values() : "" }}</textarea>
|
||||
<br />
|
||||
{{ error_form.display_errors(name, constraint_errors) }}
|
||||
</td>
|
||||
|
@@ -34,7 +34,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<input class="required_field" type='text' name='{{name}}' value="{{ caption.get_dc_field('Title') is not none ? caption.get_dc_field('Title').get_value()|default(record.get_title()) : record.get_title() }}"/>
|
||||
<input class="required_field" type='text' name='{{name}}' value="{{ caption.get_dc_field('Title') is not none ? caption.get_dc_field('Title').get_serialized_values()|default(record.get_title()) : record.get_title() }}"/>
|
||||
<br />
|
||||
{{ error_form.display_errors(name, constraint_errors) }}
|
||||
</label>
|
||||
@@ -49,7 +49,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<td class='column_right'>
|
||||
<textarea class="required_field" name="{{ name }}" rows="5">{{ caption.get_dc_field('Description') is not none ? caption.get_dc_field('Description').get_value() : ""}}</textarea>
|
||||
<textarea class="required_field" name="{{ name }}" rows="5">{{ caption.get_dc_field('Description') is not none ? caption.get_dc_field('Description').get_serialized_values() : ""}}</textarea>
|
||||
<br />
|
||||
{{ error_form.display_errors(name, constraint_errors) }}
|
||||
</td>
|
||||
|
@@ -195,11 +195,13 @@ class ControllerFeedApp extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
||||
);
|
||||
|
||||
|
||||
$crawler = $this->client->request('GET', '/feeds/entry/' . $entry->get_id() . '/edit/');
|
||||
try
|
||||
{
|
||||
$crawler = $this->client->request('GET', '/feeds/entry/' . $entry->get_id() . '/edit/');
|
||||
$this->fail('Should raise an exception');
|
||||
} catch(Exception_UnauthorizedAction $e) {
|
||||
|
||||
$response = $this->client->getResponse();
|
||||
|
||||
$this->assertFalse($response->isOk());
|
||||
}
|
||||
|
||||
$feed->delete();
|
||||
}
|
||||
|
@@ -36,11 +36,24 @@ class ControllerTooltipTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
||||
$crawler = $this->client->request('POST', '/tooltip/basket/' . $basket->getId() . '/');
|
||||
$pageContent = $this->client->getResponse()->getContent();
|
||||
$this->assertTrue($this->client->getResponse()->isOk());
|
||||
}
|
||||
|
||||
$crawler = $this->client->request('POST', '/tootltip/basket/notanid/');
|
||||
/**
|
||||
* @expectedException \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
|
||||
*/
|
||||
public function testRouteBasketFail()
|
||||
{
|
||||
$crawler = $this->client->request('POST', '/tooltip/basket/notanid/');
|
||||
$pageContent = $this->client->getResponse()->getContent();
|
||||
$this->assertFalse($this->client->getResponse()->isOk());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
|
||||
*/
|
||||
public function testRouteBasketFail2()
|
||||
{
|
||||
$crawler = $this->client->request('POST', '/tooltip/basket/-5/');
|
||||
$pageContent = $this->client->getResponse()->getContent();
|
||||
$this->assertFalse($this->client->getResponse()->isOk());
|
||||
|
@@ -340,14 +340,20 @@ class ControllerRssFeedTest extends \PhraseanetWebTestCaseAbstract
|
||||
$this->verifyXML($xml);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Exception_FeedNotFound
|
||||
*/
|
||||
public function testUnknowFeedId()
|
||||
{
|
||||
$crawler = $this->client->request("GET", "/feeds/feed/0/");
|
||||
$this->assertFalse($this->client->getResponse()->isOk());
|
||||
$this->assertEquals(404, $this->client->getResponse()->getStatusCode());
|
||||
$crawler = $this->client->request("GET", "/feeds/feed/titi/");
|
||||
$this->assertFalse($this->client->getResponse()->isOk());
|
||||
$this->assertEquals(404, $this->client->getResponse()->getStatusCode());
|
||||
$this->client->request("GET", "/feeds/feed/0/rss/");
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
|
||||
*/
|
||||
public function testUnknowFeedId2()
|
||||
{
|
||||
$this->client->request("GET", "/feeds/feed/titi/");
|
||||
}
|
||||
|
||||
public function testGetFeedId()
|
||||
@@ -634,7 +640,7 @@ class ControllerRssFeedTest extends \PhraseanetWebTestCaseAbstract
|
||||
'media_field' => array(
|
||||
'name' => 'media:credit',
|
||||
'attributes' => array(
|
||||
'role' => 'creator',
|
||||
'role' => 'director',
|
||||
'scheme' => 'urn:ebu'
|
||||
)
|
||||
),
|
||||
@@ -671,10 +677,23 @@ class ControllerRssFeedTest extends \PhraseanetWebTestCaseAbstract
|
||||
|
||||
|
||||
foreach ($fields as $key_field => $field) {
|
||||
if ($field["media_field"]["name"] == $node->nodeName) {
|
||||
|
||||
$role = true;
|
||||
|
||||
if(isset($field["media_field"]['attributes']['role'])){
|
||||
$role = false;
|
||||
foreach($node->attributes as $attr){
|
||||
if($attr->name == 'role') {
|
||||
$role = $attr->value == $field["media_field"]['attributes']['role'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($field["media_field"]["name"] == $node->nodeName && $role != false) {
|
||||
|
||||
if ($p4field = $entry_item->get_record()->get_caption()->get_dc_field($field["dc_field"])) {
|
||||
$this->assertEquals($p4field->get_serialized_values($field["separator"]), $node->nodeValue
|
||||
, sprintf('Asserting good value for DC %s', $field["dc_field"]));
|
||||
$this->assertEquals($p4field->get_serialized_values($field["separator"]), $node->nodeValue, sprintf('Asserting good value for DC %s', $field["dc_field"]));
|
||||
if (sizeof($field["media_field"]["attributes"]) > 0) {
|
||||
foreach ($node->attributes as $attribute) {
|
||||
$this->assertTrue(array_key_exists($attribute->name, $field["media_field"]["attributes"]), "Checkin attribute " . $attribute->name . " for " . $field['media_field']['name']);
|
||||
|
Reference in New Issue
Block a user