Skip to content

Commit

Permalink
Several fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
shakty committed Apr 12, 2012
1 parent 4e0469a commit cf86f40
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
4 changes: 2 additions & 2 deletions tests/importing/importing.test
Expand Up @@ -6,7 +6,7 @@

class PatternsImportTestCase extends PatternRunTestCase {

const REMOTE_URL_IMPORT = 'http://www.shakty.org/patterns/importing.yaml';
const REMOTE_URL_IMPORT = 'http://www.shakty.org/patterns/importing.yaml';

var $importing_tests_dir;

Expand All @@ -18,7 +18,7 @@ class PatternsImportTestCase extends PatternRunTestCase {
);
}

public function setUp() {
public function setUp() {

$this->importing_tests_dir = $this->getPatternsTestDir() . 'importing/';
// Enable any modules required for the tests.
Expand Down
19 changes: 15 additions & 4 deletions tests/node/content.test
Expand Up @@ -6,7 +6,7 @@

class PatternsContentTypeTestCase extends PatternRunTestCase {

const NODE_TESTS_DIR = 'tests/node/';
var $node_tests_dir;

static function getInfo() {
return array(
Expand All @@ -15,6 +15,17 @@ class PatternsContentTypeTestCase extends PatternRunTestCase {
'group' => 'Patterns',
);
}

public function setUp() {

$this->node_tests_dir = $this->getPatternsTestDir() . 'node/';
// Enable any modules required for the tests.
$modules = array('patterns_components',
'patterns_yamlparser',
);

parent::setUp($modules);
}

public function testCreateModifyDelete() {
$this->testCreate();
Expand All @@ -32,7 +43,7 @@ class PatternsContentTypeTestCase extends PatternRunTestCase {
$this->assertIdentical($node_type_count, '0', t('The content type should not exist at this point.'));

// Run the pattern.
parent::runFile('content.yaml', 'Content Type (create)', PatternsContentTypeTestCase::NODE_TESTS_DIR);
parent::runFile('content.yaml', 'Content Type (create)', $this->node_tests_dir);

// Expected messages.
$this->assertUniqueText(t('The content type Test Content Type has been added.'));
Expand All @@ -54,7 +65,7 @@ class PatternsContentTypeTestCase extends PatternRunTestCase {

private function testDelete() {
// Run the pattern.
parent::runFile('content_delete.yaml', 'Content Type (delete)', PatternsContentTypeTestCase::NODE_TESTS_DIR);
parent::runFile('content_delete.yaml', 'Content Type (delete)', $this->node_tests_dir);

// Expected messages.
$this->assertUniqueText(t('The content type Test Content Type2 has been deleted.'));
Expand All @@ -70,7 +81,7 @@ class PatternsContentTypeTestCase extends PatternRunTestCase {

private function testModify() {
// Run the pattern.
parent::runFile('content_modify.yaml', 'Content Type (modify)', PatternsContentTypeTestCase::NODE_TESTS_DIR);
parent::runFile('content_modify.yaml', 'Content Type (modify)', $this->node_tests_dir);

// Expected messages.
$this->assertUniqueText(t('The content type Test Content Type2 has been updated.'));
Expand Down
6 changes: 3 additions & 3 deletions tests/parser/valid/patterns.parser_ok.yaml
Expand Up @@ -8,8 +8,8 @@ info:
category: Taxonomy
version: 1.0
core: 7.x
author_email: sbalietti@ethz.ch
author_website: qscience.csko.hu
author_email: tests@qlectives.org
author_website: qlectives.org



Expand All @@ -21,4 +21,4 @@ actions:
name: Yet Another Vocabulary
description: Yet another Vocabulary, very useless
hierarchy: 0
# vid: 3
# vid: 3

0 comments on commit cf86f40

Please sign in to comment.