mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 08:36:39 +00:00
Moved ConditionsTest to properties subfolder
This commit is contained in:
47
tests/properties/ConditionsTest.php
Normal file
47
tests/properties/ConditionsTest.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
class ConditionsTest extends BaseClass {
|
||||
|
||||
public function testNotDanBrown() {
|
||||
$this->csv->conditions = 'author does not contain dan brown';
|
||||
|
||||
$this->_compareWithExpected([
|
||||
'The Killing Kind',
|
||||
'The Third Secret',
|
||||
'The Last Templar',
|
||||
'The Traveller',
|
||||
'Crisis Four',
|
||||
'Prey',
|
||||
'The Broker (Paperback)',
|
||||
'Without Blood (Paperback)',
|
||||
'State of Fear (Paperback)',
|
||||
'The Rule of Four (Paperback)',
|
||||
]);
|
||||
}
|
||||
|
||||
public function testRating() {
|
||||
$this->csv->conditions = 'rating < 3';
|
||||
$this->_compareWithExpected([
|
||||
'The Killing Kind',
|
||||
'The Third Secret',
|
||||
]);
|
||||
|
||||
$this->csv->conditions = 'rating >= 5';
|
||||
$this->_compareWithExpected([
|
||||
'The Traveller',
|
||||
'Prey',
|
||||
'State of Fear (Paperback)',
|
||||
'Digital Fortress : A Thriller (Mass Market Paperback)',
|
||||
'Angels & Demons (Mass Market Paperback)',
|
||||
]);
|
||||
}
|
||||
|
||||
public function testTitleContainsSecretOrCode() {
|
||||
$this->csv->conditions = 'title contains code OR title contains SECRET';
|
||||
|
||||
$this->_compareWithExpected([
|
||||
'The Third Secret',
|
||||
'The Da Vinci Code (Hardcover)',
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user