can you refactor this code using https://github.com/sonata-project/SonataAdminBundle/blob/master/Tests/tests/bootstrap.php and https://github.com/sonata-project/SonataAdminBundle/blob/master/Tests/tests/autoload.php.dist