mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Adding stub datasource to test_app.
This commit is contained in:
parent
ed74653d72
commit
0c0e5d111b
1 changed files with 30 additions and 0 deletions
30
cake/tests/test_app/models/datasources/test_source.php
Normal file
30
cake/tests/test_app/models/datasources/test_source.php
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
class TestSource extends DataSource {
|
||||
|
||||
function describe($model) {
|
||||
return compact('model');
|
||||
}
|
||||
|
||||
function listSources() {
|
||||
return array('test_source');
|
||||
}
|
||||
|
||||
function create($model, $fields = array(), $values = array()) {
|
||||
return compact('model', 'fields', 'values');
|
||||
}
|
||||
|
||||
function read($model, $queryData = array()) {
|
||||
return compact('model', 'queryData');
|
||||
}
|
||||
|
||||
function update($model, $fields = array(), $values = array()) {
|
||||
return compact('model', 'fields', 'values');
|
||||
}
|
||||
|
||||
function delete($model, $id) {
|
||||
return compact('model', 'id');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
Loading…
Reference in a new issue