This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<h1>This is a heading</h1> | |
<h2>This is a heading</h2> | |
<h3>This is a heading</h3> | |
<p>My first paragraph.</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Preprocess function. | |
*/ | |
function example_preprocess_taxonomy_term(&$vars) { | |
if ($vars['vocabulary_machine_name'] == 'service_category') { | |
$contextual_links = array( | |
'#type' => 'contextual_links', | |
'#contextual_links' => array( | |
'taxonomy' => array('taxonomy/term', array($vars['tid'])), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get database prefix. | |
$database_prefix = $GLOBALS['drupal_test_info']['test_run_id']; | |
// Generate user agent string. | |
if (preg_match('/simpletest\d+/', $database_prefix, $matches)) { | |
$user_agent = drupal_generate_test_ua($matches[0]); | |
} | |
else { | |
throw new Exception('Test is not ready to init connection to Webdriver (no database prefix)'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// $Id$ | |
/** | |
* Copyright (c) 2010 Madcap BV (http://www.madcap.nl) | |
* All rights reserved. | |
* | |
* Permission is granted for use, copying, modification, distribution, | |
* and distribution of modified versions of this work as long as the | |
* above copyright notice is included. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// $Id$ | |
/** | |
* @file | |
* Call the endpoint tests when no authentication is being used. | |
* | |
*/ | |
require_once('ServicesWebTestCase.php') ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Arguments: <?php array ( | |
'file' => | |
stdClass::__set_state(array( | |
'filesize' => 1024, | |
'filepath' => 'sites/default/files/text-1.txt', | |
'file' => 'MTEwMDAxMTEwMTEwMDAwMTEwMDExMTAxMTEwMDAxMTEwMTAxMTAxMTAwMTAwMTAwMDAwMDAxMTEwMTExMTEwCjEwMTExMTAwMTAwMDEwMDAwMTAxMTEwMTAwMTEwMDAwMDExMDExMTEwMTAwMTAwMDAxMTAwMDAwMTEwMTAwMQoxMDAxMDAwMDEwMDEwMTAwMDEwMDEwMDAxMDExMDAwMDExMDEwMTAxMTAxMTExMDExMDAxMTEwMDExMDAxMTEKMDAxMDAwMDAxMTExMTEwMTAwMTExMDEwMDExMTEwMDAwMTAxMTEwMTAxMTExMTAxMTAxMTExMDAwMTEwMDAwCjAxMDAxMDAxMTAwMTExMDExMDExMDAwMDEwMTAwMTAxMTExMTEwMDEwMDAwMDAwMTExMTEwMTEwMTEwMTEwMAoxMTAwMTAxMDEwMDEwMTEwMDExMDExMDEwMTExMTEwMDEwMTAxMDEwMDAwMTExMTAxMTEwMDExMTExMDAxMTAKMDEwMTAwMDExMTEwMDEwMTAwMDAwMDAwMTEwMDEwMTEwMTEwMTAwMDExMTAwMTExMDAxMDEwMTAwMDAxMDExCjAxMTEwMTExMTAxMTExMTExMDAwMTExMDAxMTExMTExMDExMTAwMTAxMDExMTEwMDExMDAwMTAwMDAwMDEwMAoxMTEwMDExMDAxMDAxMTAxMDEwMTAxMDEwMDAwMTAwMDAwMTExMTEwMDAwMDExMTEwMTExMTEwMDAxMDEwMTAKMDExMTEwMTAxMTAwMDAxMDExMDAxMTExMTAwMTAwMTExMTExMDAxMDAwMDEwMDAwMTAwMDAwMDAwMDExMDEwCjAxMTAxM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function testFileCreate() { | |
$text_file = current($this->drupalGetTestFiles('text')); | |
$file = new stdClass(); | |
$realpath = realpath($text_file->filename); | |
$file->filesize = filesize($realpath); | |
$file->filepath = 'sites/default/files/' . $text_file->basename; | |
$fh = fopen($realpath, 'r'); | |
$file_data = fread($fh, $file->filesize); |
NewerOlder