Skip to content

Commit

Permalink
Support for non-table model types (2.x)
Browse files Browse the repository at this point in the history
  • Loading branch information
asgraf authored Oct 10, 2023
1 parent baa00f7 commit a625a3a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Command/TestCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
use Cake\Core\Configure;
use Cake\Core\Exception\CakeException;
use Cake\Core\Plugin;
use Cake\Datasource\RepositoryInterface;
use Cake\Filesystem\Filesystem;
use Cake\Http\Response;
use Cake\Http\ServerRequest as Request;
Expand Down Expand Up @@ -459,12 +460,15 @@ public function generateFixtureList($subject): array
/**
* Process a model, pull out model name + associations converted to fixture names.
*
* @param \Cake\ORM\Table $subject A Model class to scan for associations and pull fixtures off of.
* @param @param \Cake\Datasource\RepositoryInterface $subject A Model class to scan for associations and pull fixtures off of.
* @return void
*/
protected function _processModel(Table $subject): void
protected function _processModel(RepositoryInterface $subject): void

Check failure on line 466 in src/Command/TestCommand.php

View workflow job for this annotation

GitHub Actions / Coding Standard & Static Analysis

PHPDoc tag @param has invalid value (@param \Cake\Datasource\RepositoryInterface $subject A Model class to scan for associations and pull fixtures off of.): Unexpected token "@param", expected type at offset 112
{
$this->_addFixture($subject->getAlias());
if (!method_exists($subject, 'associations')) {
return;
}
foreach ($subject->associations()->keys() as $alias) {
$assoc = $subject->getAssociation($alias);

Check failure on line 473 in src/Command/TestCommand.php

View workflow job for this annotation

GitHub Actions / Coding Standard & Static Analysis

Call to an undefined method Cake\Datasource\RepositoryInterface::getAssociation().
$target = $assoc->getTarget();
Expand Down

0 comments on commit a625a3a

Please sign in to comment.