diff --git a/src/LeanOrm/Exceptions/BadRecordClassNameForFetchingRelatedDataException.php b/src/LeanOrm/Exceptions/BadRecordClassNameForFetchingRelatedDataException.php new file mode 100644 index 0000000..ee4e1be --- /dev/null +++ b/src/LeanOrm/Exceptions/BadRecordClassNameForFetchingRelatedDataException.php @@ -0,0 +1,5 @@ +expectException(\LeanOrm\BadRecordClassNameForFetchingRelatedDataException::class); + $this->expectException(\LeanOrm\Exceptions\BadRecordClassNameForFetchingRelatedDataException::class); $model = new $this->modelClass(static::$dsn, static::$username ?? "", static::$password ?? "", [],'comment_id', 'comments'); // relation name with the same name as p key column @@ -313,7 +313,7 @@ public function testThatHasOneThrowsExceptionWithInvalidForeignModelClassName() public function testThatHasOneThrowsExceptionWithInvalidForeignRecordClassName() { - $this->expectException(\LeanOrm\BadRecordClassNameForFetchingRelatedDataException::class); + $this->expectException(\LeanOrm\Exceptions\BadRecordClassNameForFetchingRelatedDataException::class); $model = new $this->modelClass(static::$dsn, static::$username ?? "", static::$password ?? "", [],'comment_id', 'comments'); $model->hasOne( @@ -439,7 +439,7 @@ public function testThatHasManyThrowsExceptionWithInvalidForeignModelClassName() public function testThatHasManyThrowsExceptionWithInvalidForeignRecordClassName() { - $this->expectException(\LeanOrm\BadRecordClassNameForFetchingRelatedDataException::class); + $this->expectException(\LeanOrm\Exceptions\BadRecordClassNameForFetchingRelatedDataException::class); $model = new $this->modelClass(static::$dsn, static::$username ?? "", static::$password ?? "", [],'comment_id', 'comments'); $model->hasMany( @@ -567,7 +567,7 @@ public function testThatHasManyThroughThrowsExceptionWithInvalidForeignModelClas public function testThatHasManyThroughThrowsExceptionWithInvalidForeignRecordClassName() { - $this->expectException(\LeanOrm\BadRecordClassNameForFetchingRelatedDataException::class); + $this->expectException(\LeanOrm\Exceptions\BadRecordClassNameForFetchingRelatedDataException::class); $model = new $this->modelClass(static::$dsn, static::$username ?? "", static::$password ?? "", [],'post_id', 'posts'); $model->hasManyThrough(