Skip to content

Commit

Permalink
php-kafka#33 Remove accidentally committed AvroClassPropertyParser.ph…
Browse files Browse the repository at this point in the history
…p (that should act as example of extending and override)
  • Loading branch information
Pavel Alexeev authored and Pavel Alexeev committed Jan 8, 2022
1 parent 1cc81b7 commit c6c8083
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 64 deletions.
39 changes: 0 additions & 39 deletions src/Parser/AvroClassPropertyParser.php

This file was deleted.

25 changes: 0 additions & 25 deletions tests/Integration/Registry/ClassRegistryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,31 +56,6 @@ public function testLoad()
}
}

public function testLoadMinimal() {
$classDir = __DIR__ . '/../../../example/classes_minimal';

// $propertyParser = new ClassPropertyParser(new DocCommentParser());
$propertyParser = new AvroClassPropertyParser(new DocCommentParser());
$parser = new ClassParser((new ParserFactory())->create(ParserFactory::PREFER_PHP7), $propertyParser);
$converter = new PhpClassConverter($parser);
$registry = (new ClassRegistry($converter))->addClassDirectory($classDir)->load();

self::assertInstanceOf(ClassRegistryInterface::class, $registry);

$classes = $registry->getClasses();

self::assertCount(1, $classes);

foreach ($classes as $class) {
self::assertInstanceOf(PhpClassInterface::class, $class);
}

$generator = new SchemaGenerator('');
$generator->setClassRegistry($registry);
$schemas = $generator->generate();
self::assertCount(1, $schemas);
}

public function testRegisterSchemaFileThatDoesntExist()
{
$fileInfo = new SplFileInfo('somenonexistingfile');
Expand Down

0 comments on commit c6c8083

Please sign in to comment.