From 15dc45eca747ce1eb70845b689962e7eb0d1af10 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Fri, 5 May 2017 18:00:40 +0200 Subject: [PATCH] [FEATURE] Allow stand-alone tests --- .gitignore | 15 ++------------ Configuration/PHPUnit/UnitTests.xml | 24 ---------------------- README.md | 3 +++ composer.json | 31 ++++++++++++++++++++++++++++- 4 files changed, 35 insertions(+), 38 deletions(-) delete mode 100644 Configuration/PHPUnit/UnitTests.xml diff --git a/.gitignore b/.gitignore index 38ba511..4a1678b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,6 @@ -######################### -# global ignore file -######################## -# ignoring temporary files (left by e.g. vim) -# ignoring by common IDE's used directories/files -# dont ignore .rej and .orig as we want to see/clean files after conflict resolution -# -# for local exclude patterns please edit .git/info/exclude -# *~ *.bak +.Build/* *.idea *.project *.swp @@ -19,8 +11,5 @@ .settings .TemporaryItems .webprj +composer.lock nbproject - -# Ignore documentation folders generated by the extension builder. -doc/ -Documentation.tmpl/ diff --git a/Configuration/PHPUnit/UnitTests.xml b/Configuration/PHPUnit/UnitTests.xml deleted file mode 100644 index 2780ef3..0000000 --- a/Configuration/PHPUnit/UnitTests.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - ../Tests/Unit/ - - - ../Tests/Functional/ - - - diff --git a/README.md b/README.md index d2a7040..b48af0b 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,9 @@ records both using the PHPUnit extension testing framework and DBUnit. The functional test for the Utility/FileUtility class provides examples for working with [vfsStream](https://github.com/mikey179/vfsStream/). +For information on the different ways to execute the tests, please have a look +at the [handout to my workshops on test-driven development (TDD)](https://github.com/oliverklee/tdd-reader). + ## About me (Oliver Klee) diff --git a/composer.json b/composer.json index d63d3ba..d189d43 100644 --- a/composer.json +++ b/composer.json @@ -17,13 +17,42 @@ "tea": "self.version", "typo3-ter/tea": "self.version" }, + "repositories": [ + { + "type": "composer", + "url": "https://composer.typo3.org/" + } + ], "require": { - "typo3/cms-core": "^7.6.0 || ^8.7.0" + "typo3/cms": "^7.6.0" + }, + "require-dev": { + "namelesscoder/typo3-repository-client": "^1.2", + "nimut/testing-framework": "^1.0", + "mikey179/vfsStream": "^1.4", + "typo3-ter/phpunit": "*", + "phpunit/phpunit": "^4.7 || ^5.0" + }, + "config": { + "vendor-dir": ".Build/vendor", + "bin-dir": ".Build/bin" + }, + "scripts": { + "post-autoload-dump": [ + "mkdir -p .Build/Web/typo3conf/ext/", + "[ -L .Build/Web/typo3conf/ext/tea ]|| ln -snvf ../../../../. .Build/Web/typo3conf/ext/tea" + ] }, "autoload": { "psr-4": { "OliverKlee\\Tea\\": "Classes/", "OliverKlee\\Tea\\Tests\\": "Tests/" } + }, + "extra": { + "typo3/cms": { + "cms-package-dir": "{$vendor-dir}/typo3/cms", + "web-dir": ".Build/Web" + } } }