私のカスタム拡張機能には、エンティティの追加/編集フォームの一部の選択または複数選択、あるいはその両方の目的を満たすだけのモデルがいくつかあります。
したがって、これらはmagentoが「ソースモデル」と呼ぶものです。
関連する値は常に同じであり、メソッドは同じものを返します。
それらを単体テストするにはどうすればよいですか?または、さらに良いことに、それらの単体テストを作成する必要がありますか?
例を示します。
次のクラスは、呼び出されたフィールドの追加/編集フォーム、typeおよび同じフィールドのグリッド列に使用されます。  
<?php
namespace Sample\News\Model\Author\Source;
use Magento\Framework\Option\ArrayInterface;
class Type implements ArrayInterface
{
    const COLLABORATOR = 1;
    const EMPLOYEE = 2;
    /**
     * Get options
     *
     * @return array
     */
    public function toOptionArray()
    {
        $_options = [
            [
                'value' => '',
                'label' => ''
            ],
            [
                'value' => self::COLLABORATOR,
                'label' => __('Collaborator')
            ],
            [
                'value' => self::EMPLOYEE,
                'label' => __('Employee')
            ],
        ];
        return $_options;
    }
    /**
     * get options as key value pair
     *
     * @return array
     */
    public function getOptions()
    {
        $_tmpOptions = $this->toOptionArray();
        $_options = [];
        foreach ($_tmpOptions as $option) {
            $_options[$option['value']] = $option['label'];
        }
        return $_options;
    }
}